summaryrefslogtreecommitdiffstats
path: root/application/modules/user/forms/RoleAdd.php
diff options
context:
space:
mode:
authormichael pereira2011-04-01 13:56:31 +0200
committermichael pereira2011-04-01 13:56:31 +0200
commitc6ba86b7bb05519d32296e62c1bce0fd2225e90a (patch)
treeeee0a011813b3dec8e8d05f49246b37551cb7e26 /application/modules/user/forms/RoleAdd.php
parentbootmenu (diff)
parentMerge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-c6ba86b7bb05519d32296e62c1bce0fd2225e90a.tar.gz
pbs2-c6ba86b7bb05519d32296e62c1bce0fd2225e90a.tar.xz
pbs2-c6ba86b7bb05519d32296e62c1bce0fd2225e90a.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/forms/RoleAdd.php')
-rw-r--r--application/modules/user/forms/RoleAdd.php23
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:',
));