diff options
| author | Björn Geiger | 2011-03-24 13:47:33 +0100 |
|---|---|---|
| committer | Björn Geiger | 2011-03-24 13:47:33 +0100 |
| commit | 06cfaf4e0a9b521a151cc214dd217018f4c83389 (patch) | |
| tree | 1a0b6598b18d9579847d087f9ae96b63b13d143a /application/modules/user/forms/GroupRequest.php | |
| parent | Testdaten Rechtetabelle (diff) | |
| download | pbs2-06cfaf4e0a9b521a151cc214dd217018f4c83389.tar.gz pbs2-06cfaf4e0a9b521a151cc214dd217018f4c83389.tar.xz pbs2-06cfaf4e0a9b521a151cc214dd217018f4c83389.zip | |
PersonController im user Module
Diffstat (limited to 'application/modules/user/forms/GroupRequest.php')
| -rw-r--r-- | application/modules/user/forms/GroupRequest.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/application/modules/user/forms/GroupRequest.php b/application/modules/user/forms/GroupRequest.php new file mode 100644 index 0000000..2cdada0 --- /dev/null +++ b/application/modules/user/forms/GroupRequest.php @@ -0,0 +1,49 @@ +<?php + +class user_Form_GroupRequest extends Zend_Form +{ + private $grouplist; + + public function setGrouplist($grouplist){ + $this->grouplist = $grouplist; + + } + + public function getGrouplist(){ + return $this->grouplist; + } + + public function init() + { + $this->setName("GroupRequest"); + $this->setMethod('post'); + + $groupfield = $this->createElement('select','groupID'); + $groupfield ->setLabel('Group:'); + + if(count($this->grouplist)>0){ + foreach($this->grouplist as $group => $g){ + $groupfield->addMultiOption($g->getID(), $g->getTitle()); + } + } + + $groupfield->setRegisterInArrayValidator(false); + $this->addElement($groupfield); + + $this->addElement('submit', 'request', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Request Membership', + )); + + $this->addElement('button', 'cancel', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Cancel', + 'onclick' => 'location.href="/user/person/"', + )); + + } + +} + |
