HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=18)
-   -   Needed feature for ISPConfig 2.X (http://www.howtoforge.com/forums/showthread.php?t=10415)

danf.1979 7th February 2007 05:08

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? :)

till 7th February 2007 09:15

You can change the visibility of form elemnts in the code of the onshow event of the form action file.

danf.1979 8th February 2007 12:17

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 :(

till 8th February 2007 13:13

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.

danf.1979 8th February 2007 15:44

Ok no problem, I'll update the code then for that form. Thanks for the help...


All times are GMT +2. The time now is 06:45.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.