diff options
| author | Simon | 2011-03-11 00:48:32 +0100 |
|---|---|---|
| committer | Simon | 2011-03-11 00:48:32 +0100 |
| commit | 87239f3f5905fb5ca937faec449256a7801a1440 (patch) | |
| tree | c76e923b6aec6fa0a4674fc4b287538d0b386ea9 /application/forms/GroupRequest.php | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| parent | Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2 (diff) | |
| download | pbs2-87239f3f5905fb5ca937faec449256a7801a1440.tar.gz pbs2-87239f3f5905fb5ca937faec449256a7801a1440.tar.xz pbs2-87239f3f5905fb5ca937faec449256a7801a1440.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/forms/GroupRequest.php')
| -rw-r--r-- | application/forms/GroupRequest.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/application/forms/GroupRequest.php b/application/forms/GroupRequest.php new file mode 100644 index 0000000..ec717de --- /dev/null +++ b/application/forms/GroupRequest.php @@ -0,0 +1,42 @@ +<?php + +class Application_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', + )); + + } + +} + |
