From aaf8275e5ff92504357c5f3167a3f256d0d393ad Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Sun, 27 Mar 2011 16:44:55 +0200 Subject: Rollenverwaltung User Module --- application/modules/user/forms/LinkRight.php | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 application/modules/user/forms/LinkRight.php (limited to 'application/modules/user/forms/LinkRight.php') diff --git a/application/modules/user/forms/LinkRight.php b/application/modules/user/forms/LinkRight.php new file mode 100644 index 0000000..139aee4 --- /dev/null +++ b/application/modules/user/forms/LinkRight.php @@ -0,0 +1,48 @@ +rightlist = $rightlist; + } + + public function setRoleID($roleID){ + $this->roleID = $roleID; + } + + public function init() + { + $this->setName("LinkRight"); + $this->setMethod('post'); + + $rightfield = $this->createElement('select','rightID'); + $rightfield ->setLabel('Right:'); + + if(count($this->rightlist)>0){ + foreach($this->rightlist as $right => $r){ + $rightfield->addMultiOption($r->getID(), $r->getTitle()); + } + } + $rightfield->setRegisterInArrayValidator(false); + $this->addElement($rightfield); + + $this->addElement('submit', 'link', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Add Right', + )); + + $this->addElement('button', 'cancel', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Cancel', + 'onclick' => 'location.href="/user/role/show/roleID/' . $this->roleID . '"', + )); + } + + +} + -- cgit v1.2.3-55-g7522