Re: [MRBS-general] book between x and z instead of duration
Brought to you by:
jberanek
From: Anselm M. H. <an...@ho...> - 2007-12-10 15:17:38
|
Am Montag, den 10.12.2007, 15:54 +0100 schrieb Antoine Jacoutot: > On Thu, 6 Dec 2007, Antoine Jacoutot wrote: > > I was wondering if there was a way to define a period of time instead of > > a duration when booking a room. > > i.e. I'd like to be able to book a room between 2pm and 5pm instead of > > booking it at 2pm for 3 hours. > > Anyone? Yes, that is possible - and it is not even difficult, if you know which _intervals_ you want. If your MRBS for example runs on 1-hour intervals, and you want to offer 1h, 2h, 3h, 4h, 5h and until-end-of-day as intervals, go to the edit_entry.php file. Locate the place where the "Duration" input elements are generated. Remove the "input box" element, and the dropdown (<select something></select>). Create a <select name="copy-from-input-box"> <option value="1" selected>09:00h</option> <option value="2">10:00h</option> </selected> Use PHP to copy the start time + 1 (+2...) as values 09:00, 10:00... Create an <input type="hidden" name="copy-from-former-minutes-hour-dropdown" value="value-for-hours" /> such that for the processing script, the input data looks exactly the same. This will break if the user changes the start time in this form; perhaps make that non-editable.... Hope this gives you some ideas to play with. BR Anselm |