diff options
| author | Simon | 2011-03-28 13:32:14 +0200 |
|---|---|---|
| committer | Simon | 2011-03-28 13:32:14 +0200 |
| commit | cfa2f967ef68c45c396a97a651452217cda4e3df (patch) | |
| tree | 15dc981ec34481986938c350e67c6d8fb6cbcc28 /application/modules/user/forms/GroupLink.php | |
| parent | Uni-Farben und Footer angepasst (diff) | |
| parent | kleine Fehler korrigiert (diff) | |
| download | pbs2-cfa2f967ef68c45c396a97a651452217cda4e3df.tar.gz pbs2-cfa2f967ef68c45c396a97a651452217cda4e3df.tar.xz pbs2-cfa2f967ef68c45c396a97a651452217cda4e3df.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/forms/GroupLink.php')
| -rw-r--r-- | application/modules/user/forms/GroupLink.php | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/application/modules/user/forms/GroupLink.php b/application/modules/user/forms/GroupLink.php new file mode 100644 index 0000000..d2aafcc --- /dev/null +++ b/application/modules/user/forms/GroupLink.php @@ -0,0 +1,55 @@ +<?php + +class user_Form_GroupLink extends Zend_Form +{ + private $grouplist; + + public function setGrouplist($grouplist){ + $this->grouplist = $grouplist; + + } + + public function init() + { + $this->setName("GroupLink"); + $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); + + $groupfield1 = $this->createElement('select','superordinatedGroupID'); + $groupfield1 ->setLabel('superordinated Group:'); + + if(count($this->grouplist)>0){ + foreach($this->grouplist as $group => $g){ + $groupfield1->addMultiOption($g->getID(), $g->getTitle()); + } + } + $groupfield1->setRegisterInArrayValidator(false); + $this->addElement($groupfield1); + + $this->addElement('submit', 'link', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Link', + )); + + $this->addElement('button', 'cancel', array( + 'required' => false, + 'ignore' => true, + 'label' => 'Cancel', + 'onclick' => 'location.href="/user/group/"', + )); + } + + +} + |
