
7th February 2007, 06:08
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 239
Thanks: 2
Thanked 3 Times in 2 Posts
|
|
Needed feature for ISPConfig 2.X
When adding a new element in the form designer, there should be a way to specify permissions rules (Permitted for Reseller? Permitted for client?)
For example, you may want to have exclusive features for the administrator only in the website hosting plans or website adding form (Text input fields or checkboxes, etc) . Right now adding a new element in the website adding form includes also the reseller by default, which might no be what one have in mind... Or I have missed something?
|

7th February 2007, 10:15
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
|
|
You can change the visibility of form elemnts in the code of the onshow event of the form action file.
|

8th February 2007, 13:17
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 239
Thanks: 2
Thanked 3 Times in 2 Posts
|
|
I did a fast view and saw a lot of references like this
Code:
if (something)
$doc->deck[0]->elements[17]->visible = 0;
I thought using numeric indices would make very hard to "move" a new element ip in a given form? Things could break...
In other codes I see this, which seems to be better
Code:
getElementByName(name)
I did move my element up, so I guess the element index changes all indices by 1, down the form
|

8th February 2007, 14:13
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 19,805
Thanks: 285
Thanked 1,805 Times in 1,357 Posts
|
|
There is already a getElementByName function implemented:
$doc->deck[0]->getElementByName('web_mailquota')->visible = 0;
But the older code addresses the fields by ID. If you moved your field up, you will either have to change the ID's for all elements that where now on another position or replace the IS's by the getElementByName syntax which will help us in future.
|

8th February 2007, 16:44
|
|
Senior Member
|
|
Join Date: Dec 2005
Location: Chile
Posts: 239
Thanks: 2
Thanked 3 Times in 2 Posts
|
|
Ok no problem, I'll update the code then for that form. Thanks for the help...
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
Help....package missing
|
sbovisjb1 |
Installation/Configuration |
3 |
31st March 2006 12:14 |
All times are GMT +2. The time now is 03:56.
|
Recent comments
19 hours 23 min ago
1 day 39 min ago
1 day 50 min ago
1 day 58 min ago
1 day 2 hours ago
1 day 4 hours ago
1 day 6 hours ago
1 day 6 hours ago
1 day 6 hours ago
1 day 8 hours ago