summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/forms/Session.php
diff options
context:
space:
mode:
authorSebastian Schmelzer2012-01-11 14:36:35 +0100
committerSebastian Schmelzer2012-01-11 14:36:35 +0100
commitfca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e (patch)
tree6e6aaf749f34db8c7c7153c23ef85c57187430bb /application/modules/dev/forms/Session.php
parentAPI: mit addBootos kann man nun auch editieren (diff)
downloadpbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.tar.gz
pbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.tar.xz
pbs2-fca04a6dab252eb9e8c0a92ce3b7e14b32e68d1e.zip
format source files
Diffstat (limited to 'application/modules/dev/forms/Session.php')
-rw-r--r--application/modules/dev/forms/Session.php284
1 files changed, 141 insertions, 143 deletions
diff --git a/application/modules/dev/forms/Session.php b/application/modules/dev/forms/Session.php
index c543188..14004ef 100644
--- a/application/modules/dev/forms/Session.php
+++ b/application/modules/dev/forms/Session.php
@@ -1,149 +1,147 @@
-<?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/
- */
-
-class dev_Form_Session extends Zend_Form
-{
-
- private $clients;
- private $bootos;
- private $bootisos;
- private $bootmenuentries;
- private $memberships;
-
- public function init()
- {
- $this->setName("session");
- $this->setMethod('post');
-
- $this->addElement('text', 'alphasessionID', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 16)),
- ),
- 'required' => false,
- 'label' => 'alphasessionID:',
- ));
-
- $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->getMacadress());
- }
- }
- $clientfield->setRegisterInArrayValidator(false);
- $this->addElement($clientfield);
-
-
- $bootmenuentrieyfield = $this->createElement('select','bootmenuentryID');
- $bootmenuentrieyfield->setLabel('BootmenuentryID:');
- $bootmenuentrieyfield->addMultiOption('','');
- if(count($this->bootmenuentries)>0){
- foreach($this->bootmenuentries as $id => $g){
- $bootmenuentrieyfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootmenuentrieyfield->setRegisterInArrayValidator(false);
- $this->addElement($bootmenuentrieyfield);
-
-
- $bootosfield = $this->createElement('select','bootosID');
- $bootosfield ->setLabel('BootOs:');
- $bootosfield->addMultiOption('','');
- if(count($this->bootos)>0){
- foreach($this->bootos as $id => $g){
- $bootosfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootosfield->setRegisterInArrayValidator(false);
- $this->addElement($bootosfield);
-
- $bootisofield = $this->createElement('select','bootisoID');
- $bootisofield ->setLabel('BootIso:');
- 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);
-
-$this->addElement('text', 'time', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'time:',
- ));
-$this->addElement('text', 'ip', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'ip:',
- ));
-$this->addElement('text', 'ip6', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'ip6:',
- ));
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/session"'
- ));
+* 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_Session extends Zend_Form {
+
+ private $clients;
+ private $bootos;
+ private $bootisos;
+ private $bootmenuentries;
+ private $memberships;
+
+ public function init() {
+ $this->setName("session");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'alphasessionID', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 16)),
+ ),
+ 'required' => false,
+ 'label' => 'alphasessionID:',
+ ));
+
+ $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->getMacadress());
+ }
}
- function setClients($v){
- $this->clients = $v;
- }
- function setBootos($v){
- $this->bootos = $v;
- }
- function setBootisos($v){
- $this->bootisos = $v;
- }
- function setBootmenuentries($v){
- $this->bootmenuentries = $v;
- }
- function setMemberships($v){
- $this->memberships = $v;
- }
- private $buttontext = 'Save';
- function setButtontext($v){
- $this->buttontext = $v;
- }
-
+ $clientfield->setRegisterInArrayValidator(false);
+ $this->addElement($clientfield);
+
+
+ $bootmenuentrieyfield = $this->createElement('select', 'bootmenuentryID');
+ $bootmenuentrieyfield->setLabel('BootmenuentryID:');
+ $bootmenuentrieyfield->addMultiOption('', '');
+ if(count($this->bootmenuentries) > 0) {
+ foreach($this->bootmenuentries as $id => $g) {
+ $bootmenuentrieyfield->addMultiOption($g->getID(), $g->getTitle());
+ }
+ }
+ $bootmenuentrieyfield->setRegisterInArrayValidator(false);
+ $this->addElement($bootmenuentrieyfield);
+
+
+ $bootosfield = $this->createElement('select', 'bootosID');
+ $bootosfield ->setLabel('BootOs:');
+ $bootosfield->addMultiOption('', '');
+ if(count($this->bootos) > 0) {
+ foreach($this->bootos as $id => $g) {
+ $bootosfield->addMultiOption($g->getID(), $g->getTitle());
+ }
+ }
+ $bootosfield->setRegisterInArrayValidator(false);
+ $this->addElement($bootosfield);
+
+ $bootisofield = $this->createElement('select', 'bootisoID');
+ $bootisofield ->setLabel('BootIso:');
+ 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);
+
+ $this->addElement('text', 'time', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'time:',
+ ));
+ $this->addElement('text', 'ip', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'ip:',
+ ));
+ $this->addElement('text', 'ip6', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'ip6:',
+ ));
+
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => $this->buttontext,
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/session"'
+ ));
+ }
+ function setClients($v) {
+ $this->clients = $v;
+ }
+ function setBootos($v) {
+ $this->bootos = $v;
+ }
+ function setBootisos($v) {
+ $this->bootisos = $v;
+ }
+ function setBootmenuentries($v) {
+ $this->bootmenuentries = $v;
+ }
+ function setMemberships($v) {
+ $this->memberships = $v;
+ }
+ private $buttontext = 'Save';
+ function setButtontext($v) {
+ $this->buttontext = $v;
+ }
+
}