diff options
author | Björn Geiger | 2011-04-12 14:54:50 +0200 |
---|---|---|
committer | Björn Geiger | 2011-04-12 14:54:50 +0200 |
commit | e5fcbd73596db87bb5cd24e1ba91cf735549b3c3 (patch) | |
tree | 52c44f8a51a0684c9630cdee19c83ce6a7d6458a /application/modules/user/forms/RoleAdd.php | |
parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
download | pbs2-e5fcbd73596db87bb5cd24e1ba91cf735549b3c3.tar.gz pbs2-e5fcbd73596db87bb5cd24e1ba91cf735549b3c3.tar.xz pbs2-e5fcbd73596db87bb5cd24e1ba91cf735549b3c3.zip |
verschiedene Korrekturen
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'); } |