From fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Wed, 11 Jan 2012 14:36:35 +0100 Subject: format source files --- application/modules/dev/forms/GroupLink.php | 116 ++++++++++++++-------------- 1 file changed, 57 insertions(+), 59 deletions(-) (limited to 'application/modules/dev/forms/GroupLink.php') diff --git a/application/modules/dev/forms/GroupLink.php b/application/modules/dev/forms/GroupLink.php index cd77565..4857655 100644 --- a/application/modules/dev/forms/GroupLink.php +++ b/application/modules/dev/forms/GroupLink.php @@ -1,64 +1,62 @@ -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="javascript:history.back();"', - )); - } +* This program is free software distributed under the GPL version 2. +* See http://gpl.openslx.org/ +* +* If you have any feedback please consult http://feedback.openslx.org/ and +* send your suggestions, praise, or complaints to feedback@openslx.org +* +* General information about OpenSLX can be found at http://openslx.org/ +*/ + +class dev_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="javascript:history.back();"', + )); + } } -- cgit v1.2.3-55-g7522