phpScheduleIt
May 23, 2013, 06:57:05 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: Need help adding a "Comments TEXT Field" to reservations for Admins eyes only  (Read 707 times)
trumulfio
Newbie
*

Karma: 0
Posts: 8


« on: April 16, 2009, 08:07:39 PM »

Hey Nick, needless to say, awesome app. It truly rocks.

I followed your Developer's Guide to adding extra fields but kept getting an error so I just decided to undo everything instead of messing the files.

Well, as you can see I am a complete PHP illiterate, and though I am dying to learn, I do hit my head really hard a times trying to accomplish the objectives I set.
What I would like to see is an extra field underneath the Summary one that we see whenever creating or updating a reservation, however, I only want to be able to see/update it if I'm an Admin. The idea is to enter extra notes or comments regarding this particular reservation.

Please, if you find the time -  help me with this small issue.

Also, I'd like to write to you in private regarding contracting your services, if you meet our criteria for a specific custom software we are ready to create.

Again, thanks for this wonderful product.

Good Luck!
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: April 17, 2009, 04:39:41 PM »

The easiest (hackiest) way to do it would be to add a few Auth::isAdmin() checks to show the field from the reserve.template.php and read/save it in Reservation.class.php.
Logged
trumulfio
Newbie
*

Karma: 0
Posts: 8


« Reply #2 on: April 17, 2009, 07:22:58 PM »

I got it to work exactly as I wanted it by following your guide very carefully.

Where I am still lost is on making it for Admins eyes only. I figured I'd have to use some of those AUTH you mention but I have no clue where to enter them. Smiley

I placed the comments new field underneath the summary and it works perfectly but the reservation "owner" can see it.

BTW, did you get my email?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #3 on: April 21, 2009, 01:27:11 PM »

I'm still catching up on emails, but to hide the field from non-admins, you can just change the templates\reserve.template.php to not display the chunk if the user is not an admin (Auth::isAdmin() returns false).

Then you'll need to make a slight change to not expect the field to be coming back on the POST if the user is not an admin.
Logged
trumulfio
Newbie
*

Karma: 0
Posts: 8


« Reply #4 on: April 21, 2009, 02:07:46 PM »

I see, I'll try that and hopefully I'll get it to work.

Try and catch my email when you can, we are eager to know your answer.

Regards, and thanks for your replies and this amazing product.
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!