Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8001 Posts in 1848 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)field only certain users can see?
Pages: [1]   Go Down
Print
Author Topic: field only certain users can see?  (Read 208 times)
0 Members and 1 Guest are viewing this topic.
kd4rdb
New Member
*

Karma: 0
Offline Offline

Posts: 0

engineer


WWW
« on: April 24, 2003, 08:36:00 AM »

We have a few managers which need to be able to post things to the calendar which only other managers can see.  Filtering the manager events is easy enough... I've also done the private/ public mod.

I created a field in the USER ID file called $User->{manager} and set it to YES or NO in the user's profile so that it can later be used as a test for if the user is a manager or not.  $User->{manager}

The only problem I have at this point is that if the other users aren't a memeber of management, then when they create a new entry, I don't want  them to even see the option of "manager" in the public/private/employee only list.  The only thing I can think of at this point is to do a perl substitution in the appropriate section of ADD_EDIT_EVENT.HTML to replace occurances of the word manager with blanks after $fieldnames = &main: : DBGetAddFields($db) runs if the person is not a manager.

Any other ways?  

Any one know the S/ code to change

<SELECT NAME="FIELD_eventtype" SIZE="1" ><OPTION VALUE="Public" SELECTED>Public</OPTION><OPTION VALUE="Private" >Private<OPTION VALUE="Manager" >Manager</OPTION></SELECT>

to:

<SELECT NAME="FIELD_eventtype" SIZE="1" ><OPTION VALUE="Public" SELECTED>Public</OPTION><OPTION VALUE="Private" >Private</OPTION></SELECT>

by removing:
<OPTION VALUE="Manager" >Manager

Thanks!
Wes

[This message has been edited by kd4rdb (edited April 24, 2003).]

[This message has been edited by kd4rdb (edited April 24, 2003).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 212

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: April 29, 2003, 02:43:00 PM »

** Any one know the S/ code to change **

s/<OPTION VALUE="Manager" >Manager<\/OPTION>//
doesn't work?

BTW. I think you're missing an </OPTION> in your original code example?

Dan O.

[This message has been edited by DanO (edited April 29, 2003).]

Logged
Pages: [1]   Go Up
Print
Jump to: