diff options
| author | Björn Geiger | 2011-03-27 16:44:55 +0200 |
|---|---|---|
| committer | Björn Geiger | 2011-03-27 16:44:55 +0200 |
| commit | aaf8275e5ff92504357c5f3167a3f256d0d393ad (patch) | |
| tree | 1b6faae50f95f7a3bc2c51c452fc33c8f867caa4 /application/modules/user/forms/LinkRight.php | |
| parent | Compare Methode bei allen Mappern ergänzt (diff) | |
| download | pbs2-aaf8275e5ff92504357c5f3167a3f256d0d393ad.tar.gz pbs2-aaf8275e5ff92504357c5f3167a3f256d0d393ad.tar.xz pbs2-aaf8275e5ff92504357c5f3167a3f256d0d393ad.zip | |
Rollenverwaltung User Module
Diffstat (limited to 'application/modules/user/forms/LinkRight.php')
| -rw-r--r-- | application/modules/user/forms/LinkRight.php | 48 |
1 files changed, 48 insertions, 0 deletions
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 @@ +<?php + +class user_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="/user/role/show/roleID/' . $this->roleID . '"', + )); + } + + +} + |
