Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 7th February 2007, 05:08
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default 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?
Reply With Quote
Sponsored Links
  #2  
Old 7th February 2007, 09:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

You can change the visibility of form elemnts in the code of the onshow event of the form action file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 8th February 2007, 12:17
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default

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
Reply With Quote
  #4  
Old 8th February 2007, 13:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 8th February 2007, 15:44
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 245
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
 
Default

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

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help....package missing sbovisjb1 Installation/Configuration 3 31st March 2006 11:14


All times are GMT +2. The time now is 05:47.


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