diff options
author | Björn Geiger | 2011-03-23 19:31:03 +0100 |
---|---|---|
committer | Björn Geiger | 2011-03-23 19:31:03 +0100 |
commit | f581446f90526dd3466becddd625d23bd1c26ed4 (patch) | |
tree | 22b5708100e6c71e7cbd3a567527dcfc013fca91 /application/modules/dev/forms/LinkRight.php | |
parent | seriel liegt jetzt im root/ (diff) | |
download | pbs2-f581446f90526dd3466becddd625d23bd1c26ed4.tar.gz pbs2-f581446f90526dd3466becddd625d23bd1c26ed4.tar.xz pbs2-f581446f90526dd3466becddd625d23bd1c26ed4.zip |
Rollenverwaltung in Dev Modul
Diffstat (limited to 'application/modules/dev/forms/LinkRight.php')
-rw-r--r-- | application/modules/dev/forms/LinkRight.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/application/modules/dev/forms/LinkRight.php b/application/modules/dev/forms/LinkRight.php new file mode 100644 index 0000000..8b9c3a9 --- /dev/null +++ b/application/modules/dev/forms/LinkRight.php @@ -0,0 +1,48 @@ +<?php + +class dev_Form_LinkRight extends Zend_Form +{ + private $rightlist; + private $roleID; + + public function setRightlist($rightlist){ + $this->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="/dev/role/show/roleID/' . $this->roleID . '"', + )); + } + + +} + |