HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Developers' Forum (
-   -   Needed feature for ISPConfig 2.X (

danf.1979 7th February 2007 06: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 10: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 13:17

I did a fast view and saw a lot of references like this

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

I did move my element up, so I guess the element index changes all indices by 1, down the form :(

till 8th February 2007 14: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 16: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 05:08.

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