summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/forms/GroupSelect.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/forms/GroupSelect.php')
-rw-r--r--application/modules/dev/forms/GroupSelect.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/application/modules/dev/forms/GroupSelect.php b/application/modules/dev/forms/GroupSelect.php
new file mode 100644
index 0000000..1eaf455
--- /dev/null
+++ b/application/modules/dev/forms/GroupSelect.php
@@ -0,0 +1,42 @@
+<?php
+
+class dev_Form_GroupSelect extends Zend_Form
+{
+ private $grouplist;
+
+ public function setGrouplist($grouplist){
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function getGrouplist(){
+ return $this->grouplist;
+ }
+
+ public function init()
+ {
+ $this->setName("GroupSelect");
+ $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', 'selectgroup', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Select Group',
+ ));
+ }
+
+
+}
+