Jump to content

Recommended Posts

Posted

I have upgraded to version 8.7 and when logged in as a domain admin I cannot override any static bookings although I can cancel normal bookings and make bookings on behalf of people.

 

When I try to override I get the normal form but the lesson drop down menu is blank where it is filled in on a standard booking. (see attahced) As always thank you.

 

screenshot.jpg

Posted

Try this to fix it:

 

~/bookingsystem/default.aspx: line 342 should read

} catch (e) { }

change it to:

           } catch (e) 
           {
               $("#bfmultilesson").hide();
               canmulti = false; 
           }

Posted

You are correct the room does have a static booking in but in v7 I was able to override static bookings, was this removed?

 

Tried adding the code you posted and restarted IIS and it had no effect.

 

Thank you

Posted

It looks like I got it working going from your lead but I'll be completely honest I have no idea if I've broken something else.

 

~/bookingsystem/default.aspx: line 336 reads

		            canmulti = true;
	        }
	        else {
	            $("#bfmultilesson").hide();
	            canmulti = false;
	        }
	    } catch (e) 
           {
               $("#bfmultilesson").hide();
               canmulti = false; 
           }

 

I change it to:

		            canmulti = false;
	        }
	        else {
	            $("#bfmultilesson").hide();
	            canmulti = false;
	        }
	    } catch (e) 
           {
               $("#bfmultilesson").hide();
               canmulti = false; 
           }

Posted

Odd, can't see any difference there, here is some corrected code:

 

            try {
               if (curres.MultiRoom) {
                   $("#bfmultilesson").show();
                   $("#bfmultiroom option").remove();
                   var l1 = false;
                   var l2 = "";
                   var l3 = 0;
                   var i = 0;
                   for (i = 0; i < curres.Data.length; i++)
                   {
                       if (!l1) l1 = (curres.Data[i].Lesson == lesson);
                       if (l1) {
                           l3++;
                           if ( (curres.MaxLessons > 0 && l3 > curres.MaxLessons) || 
                                (l3 > availbookings[0] && availbookings[0] > 0 ) || curres.Data[i].Name != "FREE") {
                               break;
                           }
                           $("#bfmultiroom").append('' + l3 + ' Lesson' + (l3 == 1 ? '' : 's') + '');
                           l2 += curres.Data[i].Lesson + ',';
                       }
                   }
                   if (i == 0) { canmulti = false; $("#bfmultilesson").hide(); }
                   canmulti = true;
               }
               else {
                   $("#bfmultilesson").hide();
                   canmulti = false;
               }
           } catch (e) 
           {
               $("#bfmultilesson").hide();
               canmulti = false; 
           }

Posted

Sorry, this is the correct code:

            try {
               if (curres.MultiRoom) {
                   $("#bfmultilesson").show();
                   $("#bfmultiroom option").remove();
                   var l1 = false;
                   var l2 = "";
                   var l3 = 0;
                   for (var i = 0; i < curres.Data.length; i++)
                   {
                       if (!l1) l1 = (curres.Data[i].Lesson == lesson);
                       if (l1) {
                           l3++;
                           if ( (curres.MaxLessons > 0 && l3 > curres.MaxLessons) || 
                                (l3 > availbookings[0] && availbookings[0] > 0 ) || curres.Data[i].Name != "FREE") {
                               break;
                           }
                           $("#bfmultiroom").append('' + l3 + ' Lesson' + (l3 == 1 ? '' : 's') + '');
                           l2 += curres.Data[i].Lesson + ',';
                       }
                   }
                   if (l2 == "") { canmulti = false; $("#bfmultilesson").hide(); }
                   canmulti = true;
               }
               else {
                   $("#bfmultilesson").hide();
                   canmulti = false;
               }
           } catch (e) 
           {
               $("#bfmultilesson").hide();
               canmulti = false; 
           }

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...