summaryrefslogtreecommitdiffstats
path: root/application/forms/GroupRequest.php
diff options
context:
space:
mode:
authormichael pereira2011-03-11 00:47:11 +0100
committermichael pereira2011-03-11 00:47:11 +0100
commit9610ae543038c263f657232d158476788f952144 (patch)
treee3ce7a6ab6ab80c1c913da9f27a4417c1464c2d2 /application/forms/GroupRequest.php
parentpostinit.local geaendert (diff)
parentso geändert, dass nur im eingeloggten Zustand verfügbar (diff)
downloadpbs2-9610ae543038c263f657232d158476788f952144.tar.gz
pbs2-9610ae543038c263f657232d158476788f952144.tar.xz
pbs2-9610ae543038c263f657232d158476788f952144.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/forms/GroupRequest.php')
-rw-r--r--application/forms/GroupRequest.php42
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',
+ ));
+
+ }
+
+}
+