From 49ebfec064bb6d7a732466fa2071778665beb184 Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Mon, 28 Mar 2011 14:38:51 +0200 Subject: Einführung von Vererbung von Rollen --- application/modules/user/forms/RoleAdd.php | 4 ++++ application/modules/user/forms/RoleEdit.php | 11 +++++++++++ 2 files changed, 15 insertions(+) (limited to 'application/modules/user/forms') diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php index 3b5200b..a7e43a7 100644 --- a/application/modules/user/forms/RoleAdd.php +++ b/application/modules/user/forms/RoleAdd.php @@ -31,6 +31,10 @@ class user_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/user/forms/RoleEdit.php b/application/modules/user/forms/RoleEdit.php index 170a2f9..848dba3 100644 --- a/application/modules/user/forms/RoleEdit.php +++ b/application/modules/user/forms/RoleEdit.php @@ -33,6 +33,17 @@ class user_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'], )); -- cgit v1.2.3-55-g7522