summaryrefslogtreecommitdiffstats
path: root/application/modules/user/forms/RoleAdd.php
diff options
context:
space:
mode:
authorBjörn Geiger2011-04-12 14:54:50 +0200
committerBjörn Geiger2011-04-12 14:54:50 +0200
commite5fcbd73596db87bb5cd24e1ba91cf735549b3c3 (patch)
tree52c44f8a51a0684c9630cdee19c83ce6a7d6458a /application/modules/user/forms/RoleAdd.php
parentMerge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff)
downloadpbs2-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.php21
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');
}