+ Post New Thread
Results 1 to 11 of 11
Home Access Plus+ Thread, Cannot override static bookings in Projects:; I have upgraded to version 8.7 and when logged in as a domain admin I cannot override any static bookings ...
  1. #1

    Join Date
    Nov 2011
    Location
    Birmingham
    Posts
    122
    Thank Post
    30
    Thanked 24 Times in 21 Posts
    Rep Power
    10

    Cannot override static bookings

    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.

    Cannot override static bookings-screenshot.jpg

  2. #2
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,477
    Thank Post
    37
    Thanked 485 Times in 417 Posts
    Rep Power
    109
    Hmm I think I know why that does that, it's because the lesson you are overriding isn't free

  3. #3
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,477
    Thank Post
    37
    Thanked 485 Times in 417 Posts
    Rep Power
    109
    Try this to fix it:

    ~/bookingsystem/default.aspx: line 342 should read
    Code:
    } catch (e) { }
    change it to:
    Code:
                } catch (e) 
                {
                    $("#bfmultilesson").hide();
                    canmulti = false; 
                }

  4. #4

    Join Date
    Nov 2011
    Location
    Birmingham
    Posts
    122
    Thank Post
    30
    Thanked 24 Times in 21 Posts
    Rep Power
    10
    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

  5. #5

    Join Date
    Nov 2011
    Location
    Birmingham
    Posts
    122
    Thank Post
    30
    Thanked 24 Times in 21 Posts
    Rep Power
    10
    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
    Code:
    		            canmulti = true;
    		        }
    		        else {
    		            $("#bfmultilesson").hide();
    		            canmulti = false;
    		        }
    		    } catch (e) 
                {
                    $("#bfmultilesson").hide();
                    canmulti = false; 
                }
    I change it to:
    Code:
    		            canmulti = false;
    		        }
    		        else {
    		            $("#bfmultilesson").hide();
    		            canmulti = false;
    		        }
    		    } catch (e) 
                {
                    $("#bfmultilesson").hide();
                    canmulti = false; 
                }

  6. #6
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,477
    Thank Post
    37
    Thanked 485 Times in 417 Posts
    Rep Power
    109
    Odd, can't see any difference there, here is some corrected code:

    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('<option value="' + l2 + curres.Data[i].Lesson + '">' + l3 + ' Lesson' + (l3 == 1 ? '' : 's') + '</option>');
                                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; 
                }

  7. #7
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,477
    Thank Post
    37
    Thanked 485 Times in 417 Posts
    Rep Power
    109
    Sorry, this is the correct code:
    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('<option value="' + l2 + curres.Data[i].Lesson + '">' + l3 + ' Lesson' + (l3 == 1 ? '' : 's') + '</option>');
                                l2 += curres.Data[i].Lesson + ',';
                            }
                        }
                        if (l2 == "") { canmulti = false; $("#bfmultilesson").hide(); }
                        canmulti = true;
                    }
                    else {
                        $("#bfmultilesson").hide();
                        canmulti = false;
                    }
                } catch (e) 
                {
                    $("#bfmultilesson").hide();
                    canmulti = false; 
                }

  8. #8

    Join Date
    Nov 2011
    Location
    Birmingham
    Posts
    122
    Thank Post
    30
    Thanked 24 Times in 21 Posts
    Rep Power
    10
    I tried the above code and it restored the ability to multi book rooms which are free but I can not override bookings that are static.

  9. #9
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,477
    Thank Post
    37
    Thanked 485 Times in 417 Posts
    Rep Power
    109
    Ok, you may need to turn off the multi-lesson booking mode on that resource

  10. #10

    Join Date
    Nov 2011
    Location
    Birmingham
    Posts
    122
    Thank Post
    30
    Thanked 24 Times in 21 Posts
    Rep Power
    10
    Sorry how do you turn it off per resource?

  11. #11
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,477
    Thank Post
    37
    Thanked 485 Times in 417 Posts
    Rep Power
    109
    hapConfig.xml
    HTML Code:
    <resource name="ICT2" type="Room" admins="Inherit"  enabled="True" emailadmins="False" enablecharging="False"  showto="All" hidefrom="" years="Inherit"  quantities="" readonlyto="" readwriteto=""  multilessonto="None" />
    make sure multilessonto="None"

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 30
    Last Post: 21st June 2013, 12:31 AM
  2. HAP+ SIMS.net Timetable to Static Bookings
    By nickbro in forum Home Access Plus+
    Replies: 2
    Last Post: 26th September 2011, 05:26 PM
  3. Staff Cannot access Booking and helpdesk
    By spacevortex in forum Home Access Plus+
    Replies: 2
    Last Post: 25th May 2011, 11:52 PM
  4. Books & CDS
    By russdev in forum Books and Manuals
    Replies: 19
    Last Post: 22nd March 2006, 02:33 PM
  5. A Good Free Online PHP Book
    By Diello in forum Coding
    Replies: 1
    Last Post: 22nd June 2005, 10:05 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •