diff options
author | Björn Geiger | 2011-03-31 19:40:08 +0200 |
---|---|---|
committer | Björn Geiger | 2011-03-31 19:40:08 +0200 |
commit | 9a9129f1b59c0ead5cc530cfa367f9d121867b7f (patch) | |
tree | 8ae55c11d5ca665ea664a0baf2270704a09dcb63 /application/modules/user/forms/RoleAdd.php | |
parent | alphaID in KCL implementiert (diff) | |
download | pbs2-9a9129f1b59c0ead5cc530cfa367f9d121867b7f.tar.gz pbs2-9a9129f1b59c0ead5cc530cfa367f9d121867b7f.tar.xz pbs2-9a9129f1b59c0ead5cc530cfa367f9d121867b7f.zip |
Checkboxen für Rechte beim erstellen einer Rolle
Diffstat (limited to 'application/modules/user/forms/RoleAdd.php')
-rw-r--r-- | application/modules/user/forms/RoleAdd.php | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php index e8e99a5..9a9570c 100644 --- a/application/modules/user/forms/RoleAdd.php +++ b/application/modules/user/forms/RoleAdd.php @@ -22,15 +22,32 @@ class user_Form_RoleAdd extends Zend_Form 'label' => 'Title:', )); - $this->addElement('text', 'description', array( + $this->addElement('text', 'title', array( 'filters' => array('StringTrim'), 'validators' => array( - array('StringLength', false, array(0, 140)), + array('StringLength', false, array(0, 50)), ), 'required' => false, - 'label' => 'Description:', + 'label' => 'Title:', )); + $sform = new Zend_Form_SubForm(array('legend' => 'Rights:')); + if(count($this->rightlist) > 0) { + foreach($this->rightlist as $rightcategory => $rights) { + foreach($rights as $rightID => $rightTitle) { + $element = $this->createElement('checkbox', "$rightID", array( + 'label' => $rightTitle . ':', + 'belongsTo' => 'rights', + )); + $elements[] = $rightID; + $sform->addElement($element); + } + $sform->addDisplayGroup($elements, "$rightcategory", array("legend" => $rightcategory . ":")); + unset($elements); + } + } + $this->addSubForm($sform, 'rights'); + $this->addElement('checkbox', 'inheritance', array( 'label' => 'Inheritance:', )); |