phpScheduleIt
May 19, 2013, 07:40:24 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Terms of Service  (Read 2832 times)
oneagleswings
Newbie
*

Karma: 0
Posts: 6


« on: June 24, 2008, 01:33:46 PM »

I was wondering which file would I modify to make users have to check a box saying that they agree to the terms of service when they go to reserve a resource.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #1 on: June 25, 2008, 02:06:00 PM »

You can probably do it all from templates/reserve.template.php.  Look for the print_buttons_and_hidden() function.
Logged
oneagleswings
Newbie
*

Karma: 0
Posts: 6


« Reply #2 on: July 01, 2008, 05:44:37 PM »

Thank you Nick... I managed to get it in there... One more question though, how would I make it check to see if the user had checked the box before allowing them to submit the reservation?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #3 on: July 02, 2008, 09:45:08 AM »

Sorry, should have mentioned that.  You'll want to change check_reservation_form() in functions.js to return false if your checkbox is not checked.  This will prevent the reservation from being submitted.
Logged
oneagleswings
Newbie
*

Karma: 0
Posts: 6


« Reply #4 on: July 03, 2008, 12:32:11 PM »

Thank you again Nick, I managed to get that all worked out. We had a meeting about the reservation system yesterday and now they would like me to see about adding a field to the Reservation window that would allow the students to specify what they would be studying in the rooms (i.e. Business, Science, Religion, Languages, etc).

I was thinking of creating it as a module so that it wouldn't be affected when you come out with the next version, in which case it would use a separate php file to send the data to a separate table when they submitted the reservation. Yet, I'm not sure exactly how I would make it call that php file so that it would load within the Reservation window and then make sure that the data was submitted when the user clicked "Save."
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #5 on: July 07, 2008, 09:53:08 AM »

There are a couple ways to do this that I can think of. 

The first would be to make an AJAX call after the reservation is saved.  You would have the reservation ID and all form values and would be able to call out to another URL without redirecting.

The other way, which is a bit more difficult to maintain, would be to include() your 2nd file from reserve.php or lib/Reservation.class.php and make the necessary calls directly.  This would essentially make it look like your new file is part of the existing one and you could make the calls straight from the add() or update() functions.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!