summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/forms/FilterEvaluate.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/forms/FilterEvaluate.php')
-rw-r--r--application/modules/dev/forms/FilterEvaluate.php262
1 files changed, 130 insertions, 132 deletions
diff --git a/application/modules/dev/forms/FilterEvaluate.php b/application/modules/dev/forms/FilterEvaluate.php
index 4cd67d0..b5f6fb1 100644
--- a/application/modules/dev/forms/FilterEvaluate.php
+++ b/application/modules/dev/forms/FilterEvaluate.php
@@ -1,140 +1,138 @@
-<?php
+<? php
/*
* Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
- * 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/
- */
+* 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_FilterEvaluate extends Zend_Form
-{
- private $pools;
- private $bootisos;
- private $memberships;
- private $groups;
- private $clients;
+class dev_Form_FilterEvaluate extends Zend_Form {
+ private $pools;
+ private $bootisos;
+ private $memberships;
+ private $groups;
+ private $clients;
- public function init()
- {
- $this->setName("Test Filter");
- $this->setMethod('post');
- $this->setAction('/dev/filter/evaluate');
+ public function init() {
+ $this->setName("Test Filter");
+ $this->setMethod('post');
+ $this->setAction('/dev/filter/evaluate');
- $this->addElement('text', 'ip', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'IP:',
- ));
- ######################################
- $this->addElement('text', 'mac', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Mac:',
- ));
- ######################################
- $poolfield = $this->createElement('select','poolID');
- $poolfield ->setLabel('Pool:');
- $poolfield->addMultiOption('','');
- if(count($this->pools)>0){
- foreach($this->pools as $id => $g){
- $poolfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $poolfield->setRegisterInArrayValidator(false);
- $this->addElement($poolfield);
- ######################################
- $bootisofield = $this->createElement('select','bootisoID');
- $bootisofield ->setLabel('BootIso:');
- $bootisofield->addMultiOption('','');
- if(count($this->bootisos)>0){
- foreach($this->bootisos as $id => $g){
- $bootisofield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootisofield->setRegisterInArrayValidator(false);
- $this->addElement($bootisofield);
- ######################################
- $membershipfield = $this->createElement('select','membershipID');
- $membershipfield ->setLabel('Membership:');
- $membershipfield->addMultiOption('','');
- if(count($this->memberships)>0){
- foreach($this->memberships as $id => $g){
- $membershipfield->addMultiOption($g->getID(), $g->getPersonID());
- }
- }
- $membershipfield->setRegisterInArrayValidator(false);
- $this->addElement($membershipfield);
- ######################################
- $groupfield = $this->createElement('select','groupID');
- $groupfield ->setLabel('Group:');
- $groupfield->addMultiOption('','');
- if(count($this->groups)>0){
- foreach($this->groups as $id => $g){
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
- ######################################
- $this->addElement('text', 'time', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Time:',
- ));
- ######################################
- $clientfield = $this->createElement('select','clientID');
- $clientfield ->setLabel('Client:');
- $clientfield->addMultiOption('','');
- if(count($this->clients)>0){
- foreach($this->clients as $id => $g){
- $clientfield->addMultiOption($g->getID(), $g->getID() . " - " . $g->getMacadress());
- }
- }
- $clientfield->setRegisterInArrayValidator(false);
- $this->addElement($clientfield);
- ######################################
- $this->addElement('text', 'hardwarehash', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Hardwarehash:',
- ));
-
- $this->addElement('submit', 'submit', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Get It On!',
- ));
+ $this->addElement('text', 'ip', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'IP:',
+ ));
+######################################
+ $this->addElement('text', 'mac', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Mac:',
+ ));
+######################################
+ $poolfield = $this->createElement('select', 'poolID');
+ $poolfield ->setLabel('Pool:');
+ $poolfield->addMultiOption('', '');
+ if(count($this->pools) > 0) {
+ foreach($this->pools as $id => $g) {
+ $poolfield->addMultiOption($g->getID(), $g->getTitle());
+ }
}
- function setPools($v){
- $this->pools = $v;
- }
- function setBootisos($v){
- $this->bootisos = $v;
- }
- function setMemberships($v){
- $this->memberships = $v;
- }
- function setGroups($v){
- $this->groups = $v;
- }
- function setClients($v){
- $this->clients = $v;
- }
+ $poolfield->setRegisterInArrayValidator(false);
+ $this->addElement($poolfield);
+######################################
+ $bootisofield = $this->createElement('select', 'bootisoID');
+ $bootisofield ->setLabel('BootIso:');
+ $bootisofield->addMultiOption('', '');
+ if(count($this->bootisos) > 0) {
+ foreach($this->bootisos as $id => $g) {
+ $bootisofield->addMultiOption($g->getID(), $g->getTitle());
+ }
+ }
+ $bootisofield->setRegisterInArrayValidator(false);
+ $this->addElement($bootisofield);
+######################################
+ $membershipfield = $this->createElement('select', 'membershipID');
+ $membershipfield ->setLabel('Membership:');
+ $membershipfield->addMultiOption('', '');
+ if(count($this->memberships) > 0) {
+ foreach($this->memberships as $id => $g) {
+ $membershipfield->addMultiOption($g->getID(), $g->getPersonID());
+ }
+ }
+ $membershipfield->setRegisterInArrayValidator(false);
+ $this->addElement($membershipfield);
+######################################
+ $groupfield = $this->createElement('select', 'groupID');
+ $groupfield ->setLabel('Group:');
+ $groupfield->addMultiOption('', '');
+ if(count($this->groups) > 0) {
+ foreach($this->groups as $id => $g) {
+ $groupfield->addMultiOption($g->getID(), $g->getTitle());
+ }
+ }
+ $groupfield->setRegisterInArrayValidator(false);
+ $this->addElement($groupfield);
+######################################
+ $this->addElement('text', 'time', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Time:',
+ ));
+######################################
+ $clientfield = $this->createElement('select', 'clientID');
+ $clientfield ->setLabel('Client:');
+ $clientfield->addMultiOption('', '');
+ if(count($this->clients) > 0) {
+ foreach($this->clients as $id => $g) {
+ $clientfield->addMultiOption($g->getID(), $g->getID() . " - " . $g->getMacadress());
+ }
+ }
+ $clientfield->setRegisterInArrayValidator(false);
+ $this->addElement($clientfield);
+######################################
+ $this->addElement('text', 'hardwarehash', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Hardwarehash:',
+ ));
+
+ $this->addElement('submit', 'submit', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Get It On!',
+ ));
+ }
+ function setPools($v) {
+ $this->pools = $v;
+ }
+ function setBootisos($v) {
+ $this->bootisos = $v;
+ }
+ function setMemberships($v) {
+ $this->memberships = $v;
+ }
+ function setGroups($v) {
+ $this->groups = $v;
+ }
+ function setClients($v) {
+ $this->clients = $v;
+ }
}