summaryrefslogtreecommitdiffstats
path: root/application/modules/dev
diff options
context:
space:
mode:
authorSimon2011-03-28 15:09:04 +0200
committerSimon2011-03-28 15:09:04 +0200
commit7f128bfd11824b832e4e64a1b13011e837c54366 (patch)
tree5806900894bac7374bb5c655752afffb88d489a8 /application/modules/dev
parentquickfix gegen account löschen (diff)
parentEinführung von Vererbung von Rollen (diff)
downloadpbs2-7f128bfd11824b832e4e64a1b13011e837c54366.tar.gz
pbs2-7f128bfd11824b832e4e64a1b13011e837c54366.tar.xz
pbs2-7f128bfd11824b832e4e64a1b13011e837c54366.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/dev')
-rw-r--r--application/modules/dev/controllers/RoleController.php1
-rw-r--r--application/modules/dev/forms/RoleAdd.php4
-rw-r--r--application/modules/dev/forms/RoleEdit.php19
-rw-r--r--application/modules/dev/views/scripts/role/show.phtml2
4 files changed, 22 insertions, 4 deletions
diff --git a/application/modules/dev/controllers/RoleController.php b/application/modules/dev/controllers/RoleController.php
index 709d623..65989b6 100644
--- a/application/modules/dev/controllers/RoleController.php
+++ b/application/modules/dev/controllers/RoleController.php
@@ -75,6 +75,7 @@ class dev_RoleController extends Zend_Controller_Action
$_POST['title'] = $role->getTitle();
$_POST['description'] = $role->getDescription();
$_POST['groupID'] = $role->getGroupID();
+ $_POST['inheritance'] = $role->getInheritance();
$editForm = new dev_Form_RoleEdit();
} else {
$editForm = new dev_Form_RoleEdit($_POST);
diff --git a/application/modules/dev/forms/RoleAdd.php b/application/modules/dev/forms/RoleAdd.php
index d773b17..7aae426 100644
--- a/application/modules/dev/forms/RoleAdd.php
+++ b/application/modules/dev/forms/RoleAdd.php
@@ -31,6 +31,10 @@ class dev_Form_RoleAdd extends Zend_Form
'label' => 'Description:',
));
+ $this->addElement('checkbox', 'inheritance', array(
+ 'label' => 'Inheritance:',
+ ));
+
$this->addElement('submit', 'add', array(
'required' => false,
'ignore' => true,
diff --git a/application/modules/dev/forms/RoleEdit.php b/application/modules/dev/forms/RoleEdit.php
index 2c79050..c0617b7 100644
--- a/application/modules/dev/forms/RoleEdit.php
+++ b/application/modules/dev/forms/RoleEdit.php
@@ -3,9 +3,9 @@
class dev_Form_RoleEdit extends Zend_Form
{
- public function init()
- {
- $this->setName("RoleEdit");
+ public function init()
+ {
+ $this->setName("RoleEdit");
$this->setMethod('post');
$this->addElement('text', 'title', array(
@@ -28,6 +28,17 @@ class dev_Form_RoleEdit extends Zend_Form
'value' => $_POST['description'],
));
+ if($_POST['inheritance'] == 1) {
+ $this->addElement('checkbox', 'inheritance', array(
+ 'label' => 'Inheritance:',
+ 'checked' => 'checked',
+ ));
+ } else {
+ $this->addElement('checkbox', 'inheritance', array(
+ 'label' => 'Inheritance:',
+ ));
+ }
+
$this->addElement('hidden', 'groupID', array(
'value' => $_POST['groupID'],
));
@@ -44,7 +55,7 @@ class dev_Form_RoleEdit extends Zend_Form
'label' => 'Cancel',
'onclick' => 'location.href="/dev/role/"',
));
- }
+ }
}
diff --git a/application/modules/dev/views/scripts/role/show.phtml b/application/modules/dev/views/scripts/role/show.phtml
index 93f2782..38e6023 100644
--- a/application/modules/dev/views/scripts/role/show.phtml
+++ b/application/modules/dev/views/scripts/role/show.phtml
@@ -13,10 +13,12 @@ if($this->roleID) {
<tr>
<th>Title</th>
<th>Description</th>
+ <th>Inheritance</th>
</tr>
<tr class="entry">
<td><?php echo $this->role->getTitle(); ?></td>
<td><?php echo $this->role->getDescription(); ?></td>
+ <td><?php if($this->role->getInheritance() == 1) echo "yes"; else echo "no"; ?></td>
</tr>
</table>
<br />