diff options
Diffstat (limited to 'application/modules/user/forms/RoleAdd.php')
| -rw-r--r-- | application/modules/user/forms/RoleAdd.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php index 89cd540..4b5f059 100644 --- a/application/modules/user/forms/RoleAdd.php +++ b/application/modules/user/forms/RoleAdd.php @@ -41,23 +41,33 @@ class user_Form_RoleAdd extends Zend_Form 'label' => 'Title:', )); - $sform = new Zend_Form_SubForm(array('legend' => 'Rights:')); + $this->addElement('text', 'description', array( + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 140)), + ), + 'required' => false, + 'label' => 'Description:', + 'value' => $_POST['description'], + )); - $sform->addElement('button', 'checkAll', array( + if($this->addrighttoroleright) { + $sform = new Zend_Form_SubForm(array('legend' => 'Rights:')); + $sform->addElement('button', 'checkAll', array( 'required' => false, 'ignore' => true, 'label' => 'Check All', 'class' => 'leftbutton', 'onclick' => "checkAllCheckBoxes(new Array('inheritance'));", - )); - - if($this->addrighttoroleright) { + )); + $sform->addElement('button', 'uncheckAll', array( 'required' => false, 'ignore' => true, 'label' => 'Uncheck All', 'onclick' => "uncheckAllCheckBoxes(new Array('inheritance'));", )); + if(count($this->rightlist) > 0) { foreach($this->rightlist as $rightcategory => $rights) { foreach($rights as $rightID => $rightTitle) { @@ -72,6 +82,7 @@ class user_Form_RoleAdd extends Zend_Form unset($elements); } } + $this->addSubForm($sform, 'rights'); } |
