summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/forms
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/dev/forms')
-rw-r--r--application/modules/dev/forms/AuthDelete.php56
-rw-r--r--application/modules/dev/forms/AuthLogin.php82
-rw-r--r--application/modules/dev/forms/AuthRecoverPassword.php56
-rw-r--r--application/modules/dev/forms/AuthRegister.php218
-rw-r--r--application/modules/dev/forms/BootisoCreate.php220
-rw-r--r--application/modules/dev/forms/BootisoEdit.php206
-rw-r--r--application/modules/dev/forms/BootmenuCreate.php104
-rw-r--r--application/modules/dev/forms/BootmenuEdit.php106
-rw-r--r--application/modules/dev/forms/BootmenuEntriesAdd.php272
-rw-r--r--application/modules/dev/forms/BootmenuEntriesEdit.php276
-rw-r--r--application/modules/dev/forms/BootosCreate.php270
-rw-r--r--application/modules/dev/forms/BootosEdit.php286
-rw-r--r--application/modules/dev/forms/Client.php116
-rw-r--r--application/modules/dev/forms/ConfigCreate.php124
-rw-r--r--application/modules/dev/forms/ConfigEdit.php122
-rw-r--r--application/modules/dev/forms/ConfirmDeleteAccount.php54
-rw-r--r--application/modules/dev/forms/FilterAdd.php126
-rw-r--r--application/modules/dev/forms/FilterEntriesAdd.php288
-rw-r--r--application/modules/dev/forms/FilterEvaluate.php262
-rw-r--r--application/modules/dev/forms/GroupAdd.php114
-rw-r--r--application/modules/dev/forms/GroupEdit.php102
-rw-r--r--application/modules/dev/forms/GroupLink.php116
-rw-r--r--application/modules/dev/forms/GroupRequest.php92
-rw-r--r--application/modules/dev/forms/GroupSelect.php90
-rw-r--r--application/modules/dev/forms/LinkRight.php102
-rw-r--r--application/modules/dev/forms/NewPassword.php82
-rw-r--r--application/modules/dev/forms/PersonEdit.php240
-rw-r--r--application/modules/dev/forms/Pool.php110
-rw-r--r--application/modules/dev/forms/PoolClient.php68
-rw-r--r--application/modules/dev/forms/PrebootCreate.php122
-rw-r--r--application/modules/dev/forms/PrebootEdit.php120
-rw-r--r--application/modules/dev/forms/RoleAdd.php114
-rw-r--r--application/modules/dev/forms/RoleEdit.php114
-rw-r--r--application/modules/dev/forms/Session.php284
34 files changed, 2523 insertions, 2591 deletions
diff --git a/application/modules/dev/forms/AuthDelete.php b/application/modules/dev/forms/AuthDelete.php
index c8f4a8f..fd0707c 100644
--- a/application/modules/dev/forms/AuthDelete.php
+++ b/application/modules/dev/forms/AuthDelete.php
@@ -1,37 +1,35 @@
-<?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_AuthDelete extends Zend_Form
-{
+class dev_Form_AuthDelete extends Zend_Form {
- public function init()
- {
- $this->setName("Delete");
- $this->setMethod('post');
+ public function init() {
+ $this->setName("Delete");
+ $this->setMethod('post');
- $this->addElement('text', 'ID', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'ID:',
- ));
- $this->addElement('submit', 'delete', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Delete',
- ));
- }
+ $this->addElement('text', 'ID', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'ID:',
+ ));
+ $this->addElement('submit', 'delete', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Delete',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/AuthLogin.php b/application/modules/dev/forms/AuthLogin.php
index 2192c35..193b2ff 100644
--- a/application/modules/dev/forms/AuthLogin.php
+++ b/application/modules/dev/forms/AuthLogin.php
@@ -1,47 +1,45 @@
-<?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_AuthLogin extends Zend_Form
-{
-
- public function init()
- {
- $this->setName("Login");
- $this->setMethod('post');
-
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim', 'StringToLower'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'E-Mail:',
- ));
-
- $this->addElement('password', 'password', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Password:',
- ));
-
- $this->addElement('submit', 'login', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Login',
- ));
- }
+* 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_AuthLogin extends Zend_Form {
+
+ public function init() {
+ $this->setName("Login");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'email', array(
+ 'filters' => array('StringTrim', 'StringToLower'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'E-Mail:',
+ ));
+
+ $this->addElement('password', 'password', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Password:',
+ ));
+
+ $this->addElement('submit', 'login', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Login',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/AuthRecoverPassword.php b/application/modules/dev/forms/AuthRecoverPassword.php
index 2502b7a..31d2c00 100644
--- a/application/modules/dev/forms/AuthRecoverPassword.php
+++ b/application/modules/dev/forms/AuthRecoverPassword.php
@@ -1,37 +1,35 @@
-<?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_AuthRecoverPassword extends Zend_Form
-{
+class dev_Form_AuthRecoverPassword extends Zend_Form {
- public function init()
- {
- $this->setName("RecoverPassword");
- $this->setMethod('post');
+ public function init() {
+ $this->setName("RecoverPassword");
+ $this->setMethod('post');
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 30)),
- ),
- 'required' => true,
- 'label' => 'Email:',
- ));
- $this->addElement('submit', 'recoverPassword', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Recover',
- ));
- }
+ $this->addElement('text', 'email', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 30)),
+ ),
+ 'required' => true,
+ 'label' => 'Email:',
+ ));
+ $this->addElement('submit', 'recoverPassword', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Recover',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/AuthRegister.php b/application/modules/dev/forms/AuthRegister.php
index 823bd31..0f1ee4a 100644
--- a/application/modules/dev/forms/AuthRegister.php
+++ b/application/modules/dev/forms/AuthRegister.php
@@ -1,115 +1,113 @@
-<?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_AuthRegister extends Zend_Form
-{
-
- public function init()
- {
- $this->setName("Register");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
-
- $this->addElement('text', 'name', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Name:',
- ));
-
- $this->addElement('text', 'firstname', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Firstname:',
- ));
-
- $this->addElement('text', 'street', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Street:',
- ));
-
- $this->addElement('text', 'housenumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Housenumber:',
- ));
-
- $this->addElement('text', 'city', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'City:',
- ));
-
- $this->addElement('text', 'postalcode', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Postalcode:',
- ));
-
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim', 'StringToLower'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Email:',
- ));
-
- $this->addElement('password', 'password', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Password:',
- ));
-
- $this->addElement('submit', 'register', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Register',
- ));
-
-
- }
-
-
+* 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_AuthRegister extends Zend_Form {
+
+ public function init() {
+ $this->setName("Register");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+
+ $this->addElement('text', 'name', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Name:',
+ ));
+
+ $this->addElement('text', 'firstname', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Firstname:',
+ ));
+
+ $this->addElement('text', 'street', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Street:',
+ ));
+
+ $this->addElement('text', 'housenumber', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Housenumber:',
+ ));
+
+ $this->addElement('text', 'city', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'City:',
+ ));
+
+ $this->addElement('text', 'postalcode', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Postalcode:',
+ ));
+
+ $this->addElement('text', 'email', array(
+ 'filters' => array('StringTrim', 'StringToLower'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Email:',
+ ));
+
+ $this->addElement('password', 'password', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Password:',
+ ));
+
+ $this->addElement('submit', 'register', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Register',
+ ));
+
+
+ }
+
+
}
diff --git a/application/modules/dev/forms/BootisoCreate.php b/application/modules/dev/forms/BootisoCreate.php
index edb1053..eed1e87 100644
--- a/application/modules/dev/forms/BootisoCreate.php
+++ b/application/modules/dev/forms/BootisoCreate.php
@@ -1,119 +1,117 @@
-<?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_BootisoCreate extends Zend_Form
-{
-
- private $grouplist;
- private $prebootlist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
- public function setPrebootlist($prebootlist){
- $this->prebootlist = $prebootlist;
-
+* 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_BootisoCreate extends Zend_Form {
+
+ private $grouplist;
+ private $prebootlist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+ public function setPrebootlist($prebootlist) {
+ $this->prebootlist = $prebootlist;
+
+ }
+
+
+ public function init() {
+ $this->setName("BootIsoCreate");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $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());
+ }
}
-
-
- public function init()
- {
- $this->setName("BootIsoCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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);
-
- $prebootfield = $this->createElement('select','prebootID');
- $prebootfield ->setLabel('Preboot:');
-
- if(count($this->prebootlist)>0){
- foreach($this->prebootlist as $preboot => $p){
- $prebootfield->addMultiOption($p->getID(), $p->getTitle());
- }
- }
- $prebootfield->setRegisterInArrayValidator(false);
- $this->addElement($prebootfield);
-
- $serial = time();
- for($i=2; $i<14; $i+=3)
- $serial = substr($serial,0,$i) .'-'. substr($serial,$i,strlen($serial));
-
- $this->addElement('text', 'serialnumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Serialnumber:',
- 'value' => $serial
- ));
-
-
-
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0'
- ));
-
- $this->addElement('submit', 'createbootiso', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create BootISO',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootiso"'
- ));
+ $groupfield->setRegisterInArrayValidator(false);
+ $this->addElement($groupfield);
+
+ $prebootfield = $this->createElement('select', 'prebootID');
+ $prebootfield ->setLabel('Preboot:');
+ if(count($this->prebootlist) > 0) {
+ foreach($this->prebootlist as $preboot => $p) {
+ $prebootfield->addMultiOption($p->getID(), $p->getTitle());
+ }
}
+ $prebootfield->setRegisterInArrayValidator(false);
+ $this->addElement($prebootfield);
+
+ $serial = time();
+ for($i = 2; $i < 14; $i += 3)
+ { $serial = substr($serial, 0, $i) .'-'. substr($serial, $i, strlen($serial)); }
+
+ $this->addElement('text', 'serialnumber', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Serialnumber:',
+ 'value' => $serial
+ ));
+
+
+
+
+ $date = new DateTime();
+ $date->add(new DateInterval('P1Y'));
+ $this->addElement('text', 'expires', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Expires:',
+ 'value' => $date->format('Y-m-d'),
+ ));
+
+ $this->addElement('text', 'public', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Public-Level:',
+ 'value' => '0'
+ ));
+
+ $this->addElement('submit', 'createbootiso', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Create BootISO',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/dev/bootiso"'
+ ));
+
+ }
+
-
}
diff --git a/application/modules/dev/forms/BootisoEdit.php b/application/modules/dev/forms/BootisoEdit.php
index f1ad6a7..2478036 100644
--- a/application/modules/dev/forms/BootisoEdit.php
+++ b/application/modules/dev/forms/BootisoEdit.php
@@ -1,111 +1,109 @@
-<?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_BootisoEdit extends Zend_Form
-{
-
-
- private $grouplist;
- private $prebootlist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
- public function setPrebootlist($prebootlist){
- $this->prebootlist = $prebootlist;
-
+* 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_BootisoEdit extends Zend_Form {
+
+
+ private $grouplist;
+ private $prebootlist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+ public function setPrebootlist($prebootlist) {
+ $this->prebootlist = $prebootlist;
+
+ }
+
+
+ public function init() {
+ $this->setName("BootIsoCreate");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $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());
+ }
}
-
-
- public function init()
- {
- $this->setName("BootIsoCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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);
-
- $prebootfield = $this->createElement('select','prebootID');
- $prebootfield ->setLabel('Preboot:');
-
- if(count($this->prebootlist)>0){
- foreach($this->prebootlist as $preboot => $p){
- $prebootfield->addMultiOption($p->getID(), $p->getTitle());
- }
- }
- $prebootfield->setRegisterInArrayValidator(false);
- $this->addElement($prebootfield);
-
- $this->addElement('text', 'serialnumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Serialnumber:',
- ));
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0'
- ));
-
-
- $this->addElement('submit', 'editbootiso', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit BootISO',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootiso"'
- ));
+ $groupfield->setRegisterInArrayValidator(false);
+ $this->addElement($groupfield);
+
+ $prebootfield = $this->createElement('select', 'prebootID');
+ $prebootfield ->setLabel('Preboot:');
+ if(count($this->prebootlist) > 0) {
+ foreach($this->prebootlist as $preboot => $p) {
+ $prebootfield->addMultiOption($p->getID(), $p->getTitle());
+ }
}
+ $prebootfield->setRegisterInArrayValidator(false);
+ $this->addElement($prebootfield);
+
+ $this->addElement('text', 'serialnumber', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Serialnumber:',
+ ));
+
+ $date = new DateTime();
+ $date->add(new DateInterval('P1Y'));
+ $this->addElement('text', 'expires', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Expires:',
+ 'value' => $date->format('Y-m-d'),
+ ));
+
+ $this->addElement('text', 'public', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Public-Level:',
+ 'value' => '0'
+ ));
+
+
+ $this->addElement('submit', 'editbootiso', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit BootISO',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/dev/bootiso"'
+ ));
+
+ }
}
diff --git a/application/modules/dev/forms/BootmenuCreate.php b/application/modules/dev/forms/BootmenuCreate.php
index f94f3c5..5d4ff28 100644
--- a/application/modules/dev/forms/BootmenuCreate.php
+++ b/application/modules/dev/forms/BootmenuCreate.php
@@ -1,60 +1,58 @@
-<?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_BootmenuCreate extends Zend_Form
-{
- private $grouplist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function init()
- {
- $this->setName("BootMenuCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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', 'createbootmenu', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create Bootmenu',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootmenu"'
- ));
+* 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_BootmenuCreate extends Zend_Form {
+ private $grouplist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function init() {
+ $this->setName("BootMenuCreate");
+ $this->setMethod('post');
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $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', 'createbootmenu', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Create Bootmenu',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/bootmenu"'
+ ));
+
+ }
}
diff --git a/application/modules/dev/forms/BootmenuEdit.php b/application/modules/dev/forms/BootmenuEdit.php
index f20cd08..d8d80d7 100644
--- a/application/modules/dev/forms/BootmenuEdit.php
+++ b/application/modules/dev/forms/BootmenuEdit.php
@@ -1,61 +1,59 @@
-<?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_BootmenuEdit extends Zend_Form
-{
-
- private $grouplist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function init()
- {
- $this->setName("BootMenuEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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', 'editbootmenu', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit BootMenu',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootmenu"'
- ));
+* 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_BootmenuEdit extends Zend_Form {
+
+ private $grouplist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function init() {
+ $this->setName("BootMenuEdit");
+ $this->setMethod('post');
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $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', 'editbootmenu', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit BootMenu',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/bootmenu"'
+ ));
+
+ }
}
diff --git a/application/modules/dev/forms/BootmenuEntriesAdd.php b/application/modules/dev/forms/BootmenuEntriesAdd.php
index 9b17c3a..0d33916 100644
--- a/application/modules/dev/forms/BootmenuEntriesAdd.php
+++ b/application/modules/dev/forms/BootmenuEntriesAdd.php
@@ -1,147 +1,145 @@
-<?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_BootmenuEntriesAdd extends Zend_Form
-{
- private $bootoslist;
- private $configlist;
- private $maxorder;
-
- public function setBootoslist($bootoslist){
- $this->bootoslist = $bootoslist;
+* 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_BootmenuEntriesAdd extends Zend_Form {
+ private $bootoslist;
+ private $configlist;
+ private $maxorder;
+
+ public function setBootoslist($bootoslist) {
+ $this->bootoslist = $bootoslist;
+ }
+
+ public function setMaxorder($maxorder) {
+ $this->maxorder = $maxorder;
+
+ }
+
+ public function setConfiglist($configlist) {
+ $this->configlist = $configlist;
+
+ }
+
+
+ public function init() {
+
+ if(!isset($_POST['bootosID'])) {
+ $firstbootos = array_slice($this->bootoslist, 0, 1);
+ $_POST['bootosID'] = $firstbootos[0]->getID();
+ $_POST['kclactive'] = true;
}
-
- public function setMaxorder($maxorder){
- $this->maxorder = $maxorder;
-
+
+ $this->setName("BootMenuEntryAdd");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $bootosfield = $this->createElement('select', 'bootosID');
+ $bootosfield ->setLabel('BootOs:');
+ $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
+
+ if(count($this->bootoslist) > 0) {
+ foreach($this->bootoslist as $bootos => $b) {
+ $bootosfield->addMultiOption($b->getID(), $b->getTitle());
+ }
+ }
+ $bootosfield->setRegisterInArrayValidator(false);
+
+ $this->addElement($bootosfield);
+
+ $kclactive = $this->createElement('checkbox', 'kclactive');
+ $kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
+ $kclactive->setLabel('Use default KCL:');
+ $kclactive->setValue(true);
+ $this->addElement($kclactive);
+
+
+ if($_POST['kclactive']) {
+ $this->addElement('textarea', 'kcl', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'cols' => 50,
+ 'rows' => 5,
+ 'label' => 'KCL:',
+ 'readOnly' => true,
+ 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
+
+ ));
}
-
- public function setConfiglist($configlist){
- $this->configlist = $configlist;
-
+
+ if($_POST['kclactive'])
+ { $kcllength = 175 - strlen($this->bootoslist[$_POST['bootosID']]->getDefaultkcl()); }
+ else
+ { $kcllength = 175; }
+
+ $this->addElement('textarea', 'kclappend', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, $kcllength)),
+ ),
+ 'required' => false,
+ 'cols' => 50,
+ 'rows' => 5,
+ 'label' => 'KCL-Append:',
+ 'description' => 'Chars left: ' . $kcllength
+ ));
+
+ $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID();
+ $configfield = $this->createElement('select', 'configID');
+ $configfield->setLabel('Config:');
+ $configfield->addMultiOption($defaultconfigid, 'default');
+
+ if(count($this->configlist) > 0) {
+ foreach($this->configlist as $config => $c) {
+ if($c->getID() != $defaultconfigid)
+ { $configfield->addMultiOption($c->getID(), $c->getTitle()); }
+ }
}
-
-
- public function init()
- {
-
- if(!isset($_POST['bootosID'])){
- $firstbootos = array_slice($this->bootoslist,0,1);
- $_POST['bootosID'] = $firstbootos[0]->getID();
- $_POST['kclactive'] = true;
- }
-
- $this->setName("BootMenuEntryAdd");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $bootosfield = $this->createElement('select','bootosID');
- $bootosfield ->setLabel('BootOs:');
- $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
-
- if(count($this->bootoslist)>0){
- foreach($this->bootoslist as $bootos => $b){
- $bootosfield->addMultiOption($b->getID(), $b->getTitle());
- }
- }
- $bootosfield->setRegisterInArrayValidator(false);
-
- $this->addElement($bootosfield);
-
- $kclactive = $this->createElement('checkbox','kclactive');
- $kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
- $kclactive->setLabel('Use default KCL:');
- $kclactive->setValue(true);
- $this->addElement($kclactive);
-
-
- if($_POST['kclactive']){
- $this->addElement('textarea', 'kcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL:',
- 'readOnly' => true,
- 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
-
- ));
- }
-
- if($_POST['kclactive'])
- $kcllength = 175 - strlen($this->bootoslist[$_POST['bootosID']]->getDefaultkcl());
- else
- $kcllength = 175;
-
- $this->addElement('textarea', 'kclappend', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, $kcllength)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL-Append:',
- 'description' => 'Chars left: ' . $kcllength
- ));
-
- $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID();
- $configfield = $this->createElement('select','configID');
- $configfield->setLabel('Config:');
- $configfield->addMultiOption($defaultconfigid, 'default');
-
- if(count($this->configlist)>0){
- foreach($this->configlist as $config => $c){
- if($c->getID() != $defaultconfigid)
- $configfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
-
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $orderfield = $this->createElement('select','order');
- $orderfield ->setLabel('Position:');
-
- for ($i = 0; $i <= $this->maxorder; $i++) {
- $orderfield->addMultiOption($i, $i+1);
- }
- $orderfield->setRegisterInArrayValidator(false);
- $this->addElement($orderfield);
-
- $this->addElement('submit', 'addbootmenuentry', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add Bootmenuentry',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootmenu"'
- ));
+ $configfield->setRegisterInArrayValidator(false);
+ $this->addElement($configfield);
+
+ $orderfield = $this->createElement('select', 'order');
+ $orderfield ->setLabel('Position:');
+
+ for ($i = 0; $i <= $this->maxorder; $i++) {
+ $orderfield->addMultiOption($i, $i + 1);
}
-
-
+ $orderfield->setRegisterInArrayValidator(false);
+ $this->addElement($orderfield);
+
+ $this->addElement('submit', 'addbootmenuentry', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Add Bootmenuentry',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/dev/bootmenu"'
+ ));
+
+ }
+
+
}
diff --git a/application/modules/dev/forms/BootmenuEntriesEdit.php b/application/modules/dev/forms/BootmenuEntriesEdit.php
index 87fcb9e..096d0f4 100644
--- a/application/modules/dev/forms/BootmenuEntriesEdit.php
+++ b/application/modules/dev/forms/BootmenuEntriesEdit.php
@@ -1,150 +1,148 @@
-<?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_BootmenuEntriesEdit extends Zend_Form
-{
-
- private $bootoslist;
- private $configlist;
- private $maxorder;
- private $kcl;
-
- public function setBootoslist($bootoslist){
- $this->bootoslist = $bootoslist;
+* 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_BootmenuEntriesEdit extends Zend_Form {
+
+ private $bootoslist;
+ private $configlist;
+ private $maxorder;
+ private $kcl;
+
+ public function setBootoslist($bootoslist) {
+ $this->bootoslist = $bootoslist;
+ }
+
+ public function setMaxorder($maxorder) {
+ $this->maxorder = $maxorder;
+ }
+
+ public function setConfiglist($configlist) {
+ $this->configlist = $configlist;
+ }
+ public function setKcl($kcl) {
+ $this->kcl = $kcl;
+ }
+
+
+ public function init() {
+
+ if(!isset($_POST['bootosID'])) {
+ $firstbootos = array_slice($this->bootoslist, 0, 1);
+ $_POST['bootosID'] = $firstbootos[0]->getID();
+ if(isset($this->kcl))
+ { $_POST['kclactive'] = true; }
+ else
+ { $_POST['kclactive'] = false; }
}
-
- public function setMaxorder($maxorder){
- $this->maxorder = $maxorder;
+
+ $this->setName("BootMenuEntryAdd");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $bootosfield = $this->createElement('select', 'bootosID');
+ $bootosfield->setLabel('BootOs:');
+ $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
+
+
+ if(count($this->bootoslist) > 0) {
+ foreach($this->bootoslist as $bootos => $b) {
+ $bootosfield->addMultiOption($b->getID(), $b->getTitle());
+ }
}
-
- public function setConfiglist($configlist){
- $this->configlist = $configlist;
+ $bootosfield->setRegisterInArrayValidator(false);
+ $this->addElement($bootosfield);
+
+ $kclactive = $this->createElement('checkbox', 'kclactive');
+ $kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
+ $kclactive->setLabel('Use default KCL:');
+ $kclactive->setValue($_POST['kclactive']);
+ $this->addElement($kclactive);
+
+ if($_POST['kclactive']) {
+ $this->addElement('textarea', 'kcl', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'cols' => 50,
+ 'rows' => 5,
+ 'label' => 'KCL:',
+ 'readOnly' => true,
+ 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
+ ));
}
- public function setKcl($kcl){
- $this->kcl = $kcl;
+
+ if($_POST['kclactive'])
+ { $kcllength = 175 - strlen($this->bootoslist[$_POST['bootosID']]->getDefaultkcl()); }
+ else
+ { $kcllength = 175; }
+
+ $this->addElement('textarea', 'kclappend', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, $kcllength)),
+ ),
+ 'required' => false,
+ 'cols' => 50,
+ 'rows' => 5,
+ 'label' => 'KCL-Append:',
+ 'description' => 'Chars left: ' . $kcllength
+
+ ));
+
+ $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID();
+ $configfield = $this->createElement('select', 'configID');
+ $configfield->setLabel('Config:');
+ $configfield->addMultiOption($defaultconfigid, 'default');
+
+ if(count($this->configlist) > 0) {
+ foreach($this->configlist as $config => $c) {
+ if($c->getID() != $defaultconfigid)
+ { $configfield->addMultiOption($c->getID(), $c->getTitle()); }
+ }
}
-
-
- public function init()
- {
-
- if(!isset($_POST['bootosID'])){
- $firstbootos = array_slice($this->bootoslist,0,1);
- $_POST['bootosID'] = $firstbootos[0]->getID();
- if(isset($this->kcl))
- $_POST['kclactive'] = true;
- else
- $_POST['kclactive'] = false;
- }
-
- $this->setName("BootMenuEntryAdd");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $bootosfield = $this->createElement('select','bootosID');
- $bootosfield->setLabel('BootOs:');
- $bootosfield->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
-
-
- if(count($this->bootoslist)>0){
- foreach($this->bootoslist as $bootos => $b){
- $bootosfield->addMultiOption($b->getID(), $b->getTitle());
- }
- }
- $bootosfield->setRegisterInArrayValidator(false);
- $this->addElement($bootosfield);
-
- $kclactive = $this->createElement('checkbox','kclactive');
- $kclactive->setAttrib('onChange', "document.getElementById('BootMenuEntryAdd').submit();");
- $kclactive->setLabel('Use default KCL:');
- $kclactive->setValue($_POST['kclactive']);
- $this->addElement($kclactive);
-
- if($_POST['kclactive']){
- $this->addElement('textarea', 'kcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL:',
- 'readOnly' => true,
- 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl()
- ));
- }
-
- if($_POST['kclactive'])
- $kcllength = 175 - strlen($this->bootoslist[$_POST['bootosID']]->getDefaultkcl());
- else
- $kcllength = 175;
-
- $this->addElement('textarea', 'kclappend', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, $kcllength)),
- ),
- 'required' => false,
- 'cols' => 50,
- 'rows' => 5,
- 'label' => 'KCL-Append:',
- 'description' => 'Chars left: ' . $kcllength
-
- ));
-
- $defaultconfigid = $this->bootoslist[$_POST['bootosID']]->getConfigID();
- $configfield = $this->createElement('select','configID');
- $configfield->setLabel('Config:');
- $configfield->addMultiOption($defaultconfigid, 'default');
-
- if(count($this->configlist)>0){
- foreach($this->configlist as $config => $c){
- if($c->getID() != $defaultconfigid)
- $configfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $orderfield = $this->createElement('select','order');
- $orderfield ->setLabel('Position:');
-
- for ($i = 0; $i < $this->maxorder; $i++) {
- $orderfield->addMultiOption($i, $i+1);
- }
- $orderfield->setRegisterInArrayValidator(false);
- $this->addElement($orderfield);
-
- $this->addElement('submit', 'editbootmenuentry', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit Bootmenuentry',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/bootmenu"'
- ));
+ $configfield->setRegisterInArrayValidator(false);
+ $this->addElement($configfield);
+
+ $orderfield = $this->createElement('select', 'order');
+ $orderfield ->setLabel('Position:');
+ for ($i = 0; $i < $this->maxorder; $i++) {
+ $orderfield->addMultiOption($i, $i + 1);
}
-
+ $orderfield->setRegisterInArrayValidator(false);
+ $this->addElement($orderfield);
+
+ $this->addElement('submit', 'editbootmenuentry', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit Bootmenuentry',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/dev/bootmenu"'
+ ));
+
+ }
+
}
diff --git a/application/modules/dev/forms/BootosCreate.php b/application/modules/dev/forms/BootosCreate.php
index b13e9e6..78ad28d 100644
--- a/application/modules/dev/forms/BootosCreate.php
+++ b/application/modules/dev/forms/BootosCreate.php
@@ -1,144 +1,142 @@
-<?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_BootosCreate extends Zend_Form
-{
-
- private $grouplist;
- private $configlist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function setConfiglist($configlist){
- $this->configlist = $configlist;
-
+* 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_BootosCreate extends Zend_Form {
+
+ private $grouplist;
+ private $configlist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function setConfiglist($configlist) {
+ $this->configlist = $configlist;
+
+ }
+
+ public function init() {
+ $this->setName("BootOsCreate");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+
+ $configfield = $this->createElement('select', 'configID');
+ $configfield ->setLabel('Config:');
+
+ if(count($this->configlist) > 0) {
+ foreach($this->configlist as $config => $c) {
+ $configfield->addMultiOption($c->getID(), $c->getTitle());
+ }
}
-
- public function init()
- {
- $this->setName("BootOsCreate");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
-
- $configfield = $this->createElement('select','configID');
- $configfield ->setLabel('Config:');
-
- if(count($this->configlist)>0){
- foreach($this->configlist as $config => $c){
- $configfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $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('text', 'path_init', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 250)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Init-Path:',
- ));
-
- $this->addElement('text', 'path_kernel', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 250)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Kernel-Path:',
- ));
-
- $this->addElement('textarea', 'defaultkcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 175)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Default-KCL:',
- ));
-
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Description:',
- ));
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0',
- ));
-
- $this->addElement('submit', 'createbootos', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create BootOS',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootos"'
- ));
+ $configfield->setRegisterInArrayValidator(false);
+ $this->addElement($configfield);
+ $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('text', 'path_init', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 250)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Init-Path:',
+ ));
+
+ $this->addElement('text', 'path_kernel', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 250)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Kernel-Path:',
+ ));
+
+ $this->addElement('textarea', 'defaultkcl', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 175)),
+ ),
+ 'required' => false,
+ 'rows' => 5,
+ 'cols' => 50,
+ 'label' => 'Default-KCL:',
+ ));
+
+ $this->addElement('textarea', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'rows' => 5,
+ 'cols' => 50,
+ 'label' => 'Description:',
+ ));
+
+ $date = new DateTime();
+ $date->add(new DateInterval('P1Y'));
+ $this->addElement('text', 'expires', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Expires:',
+ 'value' => $date->format('Y-m-d'),
+ ));
+
+
+ $this->addElement('text', 'public', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Public-Level:',
+ 'value' => '0',
+ ));
+
+ $this->addElement('submit', 'createbootos', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Create BootOS',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/bootos"'
+ ));
+
+ }
}
diff --git a/application/modules/dev/forms/BootosEdit.php b/application/modules/dev/forms/BootosEdit.php
index c7224f7..5f10051 100644
--- a/application/modules/dev/forms/BootosEdit.php
+++ b/application/modules/dev/forms/BootosEdit.php
@@ -1,152 +1,150 @@
-<?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_BootosEdit extends Zend_Form
-{
-
- private $grouplist;
- private $configlist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function setConfiglist($configlist){
- $this->configlist = $configlist;
-
+* 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_BootosEdit extends Zend_Form {
+
+ private $grouplist;
+ private $configlist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function setConfiglist($configlist) {
+ $this->configlist = $configlist;
+
+ }
+
+ public function init() {
+ $this->setName("BootOsEdit");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $configfield = $this->createElement('select', 'configID');
+ $configfield ->setLabel('Config:');
+
+ if(count($this->configlist) > 0) {
+ foreach($this->configlist as $config => $c) {
+ $configfield->addMultiOption($c->getID(), $c->getTitle());
+ }
}
-
- public function init()
- {
- $this->setName("BootOsEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $configfield = $this->createElement('select','configID');
- $configfield ->setLabel('Config:');
-
- if(count($this->configlist)>0){
- foreach($this->configlist as $config => $c){
- $configfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
- $configfield->setRegisterInArrayValidator(false);
- $this->addElement($configfield);
-
- $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('text', 'path_init', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Init-Path:',
- ));
-
- $this->addElement('text', 'path_kernel', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Kernel-Path:',
- ));
-
- $this->addElement('textarea', 'defaultkcl', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 175)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Default-KCL:',
- ));
-
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'rows' => 5,
- 'cols' => 50,
- 'label' => 'Description:',
- ));
-
- $date = new DateTime();
- $date->add(new DateInterval('P1Y'));
- $this->addElement('text', 'expires', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Expires:',
- 'value' => $date->format('Y-m-d'),
- ));
-
-
- $this->addElement('text', 'public', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Public-Level:',
- 'value' => '0',
- ));
-
- $this->addElement('submit', 'editbootos', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit BootOS',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/bootos"'
- ));
+ $configfield->setRegisterInArrayValidator(false);
+ $this->addElement($configfield);
+ $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('text', 'path_init', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Init-Path:',
+ ));
+
+ $this->addElement('text', 'path_kernel', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Kernel-Path:',
+ ));
+
+ $this->addElement('textarea', 'defaultkcl', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 175)),
+ ),
+ 'required' => false,
+ 'rows' => 5,
+ 'cols' => 50,
+ 'label' => 'Default-KCL:',
+ ));
+
+ $this->addElement('textarea', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'rows' => 5,
+ 'cols' => 50,
+ 'label' => 'Description:',
+ ));
+
+ $date = new DateTime();
+ $date->add(new DateInterval('P1Y'));
+ $this->addElement('text', 'expires', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Expires:',
+ 'value' => $date->format('Y-m-d'),
+ ));
+
+
+ $this->addElement('text', 'public', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Public-Level:',
+ 'value' => '0',
+ ));
+
+ $this->addElement('submit', 'editbootos', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit BootOS',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/bootos"'
+ ));
+
+ }
}
diff --git a/application/modules/dev/forms/Client.php b/application/modules/dev/forms/Client.php
index 6bf16dd..bc94154 100644
--- a/application/modules/dev/forms/Client.php
+++ b/application/modules/dev/forms/Client.php
@@ -1,68 +1,66 @@
-<?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_Client extends Zend_Form
-{
+class dev_Form_Client extends Zend_Form {
- public function init()
- {
- $this->setName("pool");
- $this->setMethod('post');
-
- $groupfield = $this->createElement('select','groupID');
- $groupfield ->setLabel('Group:');
-
- foreach($this->groups as $c){
- $groupfield->addMultiOption($c->getID(),$c->getTitle());
- }
- $this->addElement($groupfield);
-
-
- $this->addElement('text', 'macadress', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'MacAdress:',
- ));
- $this->addElement('text', 'hardwarehash', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Hardwarehash:',
- ));
+ public function init() {
+ $this->setName("pool");
+ $this->setMethod('post');
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/client"'
- ));
+ $groupfield = $this->createElement('select', 'groupID');
+ $groupfield ->setLabel('Group:');
+
+ foreach($this->groups as $c) {
+ $groupfield->addMultiOption($c->getID(), $c->getTitle());
}
- private $buttontext = 'Save';
- private $groups;
- function setButtontext($v){
- $this->buttontext = $v;
- }
- public function setGroups($groups){
- $this->groups = $groups;
- return $this;
- }
+ $this->addElement($groupfield);
+
+
+ $this->addElement('text', 'macadress', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'MacAdress:',
+ ));
+ $this->addElement('text', 'hardwarehash', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Hardwarehash:',
+ ));
+
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => $this->buttontext,
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/dev/client"'
+ ));
+ }
+ private $buttontext = 'Save';
+ private $groups;
+ function setButtontext($v) {
+ $this->buttontext = $v;
+ }
+ public function setGroups($groups) {
+ $this->groups = $groups;
+ return $this;
+ }
}
diff --git a/application/modules/dev/forms/ConfigCreate.php b/application/modules/dev/forms/ConfigCreate.php
index 8e05937..8ebc560 100644
--- a/application/modules/dev/forms/ConfigCreate.php
+++ b/application/modules/dev/forms/ConfigCreate.php
@@ -1,73 +1,71 @@
-<?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_ConfigCreate extends Zend_Form
-{
+class dev_Form_ConfigCreate extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function init()
- {
- $this->setName("ConfigCreate");
- $this->setMethod('post');
+ private $grouplist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function init() {
+ $this->setName("ConfigCreate");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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('textarea', 'shellscript', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'rows' => 10,
- 'cols' => 70,
- 'label' => 'Shellscript:',
- ));
-
- $this->addElement('submit', 'createconfig', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create Config',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/config"'
- ));
+ $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('textarea', 'shellscript', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'rows' => 10,
+ 'cols' => 70,
+ 'label' => 'Shellscript:',
+ ));
+
+ $this->addElement('submit', 'createconfig', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Create Config',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/config"'
+ ));
+
+ }
+
}
diff --git a/application/modules/dev/forms/ConfigEdit.php b/application/modules/dev/forms/ConfigEdit.php
index b6d3ae7..809929c 100644
--- a/application/modules/dev/forms/ConfigEdit.php
+++ b/application/modules/dev/forms/ConfigEdit.php
@@ -1,72 +1,70 @@
-<?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_ConfigEdit extends Zend_Form
-{
- private $grouplist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
+class dev_Form_ConfigEdit extends Zend_Form {
+ private $grouplist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
- public function init()
- {
- $this->setName("ConfigEdit");
- $this->setMethod('post');
+ public function init() {
+ $this->setName("ConfigEdit");
+ $this->setMethod('post');
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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('textarea', 'shellscript', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'rows' => 10,
- 'cols' => 70,
- 'label' => 'Shellscript:',
- ));
-
- $this->addElement('submit', 'editconfig', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit Config',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/config"'
- ));
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+ $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('textarea', 'shellscript', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'rows' => 10,
+ 'cols' => 70,
+ 'label' => 'Shellscript:',
+ ));
+
+ $this->addElement('submit', 'editconfig', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit Config',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/config"'
+ ));
+
+ }
+
}
diff --git a/application/modules/dev/forms/ConfirmDeleteAccount.php b/application/modules/dev/forms/ConfirmDeleteAccount.php
index 567fec0..a27e02a 100644
--- a/application/modules/dev/forms/ConfirmDeleteAccount.php
+++ b/application/modules/dev/forms/ConfirmDeleteAccount.php
@@ -1,35 +1,33 @@
-<?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_ConfirmDeleteAccount extends Zend_Form
-{
+class dev_Form_ConfirmDeleteAccount extends Zend_Form {
- public function init()
- {
- $this->setName("ConfirmDeleteAccount");
- $this->setMethod('post');
-
- $this->addElement('submit', 'confirmdelete', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Confirm',
- ));
+ public function init() {
+ $this->setName("ConfirmDeleteAccount");
+ $this->setMethod('post');
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
+ $this->addElement('submit', 'confirmdelete', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Confirm',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="javascript:history.back();"',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/FilterAdd.php b/application/modules/dev/forms/FilterAdd.php
index 67acd6f..3b3b905 100644
--- a/application/modules/dev/forms/FilterAdd.php
+++ b/application/modules/dev/forms/FilterAdd.php
@@ -1,75 +1,73 @@
-<?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_FilterAdd extends Zend_Form
-{
- private $bootmenus;
+class dev_Form_FilterAdd extends Zend_Form {
+ private $bootmenus;
- public function init()
- {
- $this->setName("Add Filter");
- $this->setMethod('post');
+ public function init() {
+ $this->setName("Add Filter");
+ $this->setMethod('post');
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'required' => false,
- 'label' => 'Description:',
- ));
-
- $bootmenufield = $this->createElement('select','bootmenuID');
- $bootmenufield ->setLabel('Bootmenu:');
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+ $this->addElement('textarea', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'required' => false,
+ 'label' => 'Description:',
+ ));
- if(count($this->bootmenus)>0){
- foreach($this->bootmenus as $id => $g){
- $bootmenufield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $bootmenufield->setRegisterInArrayValidator(false);
- $this->addElement($bootmenufield);
+ $bootmenufield = $this->createElement('select', 'bootmenuID');
+ $bootmenufield ->setLabel('Bootmenu:');
- $this->addElement('text', 'priority', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Priority:',
- ));
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/filter"'
- ));
+ if(count($this->bootmenus) > 0) {
+ foreach($this->bootmenus as $id => $g) {
+ $bootmenufield->addMultiOption($g->getID(), $g->getTitle());
+ }
}
- function setBootmenus($val){
- $this->bootmenus = $val;
- return;
- }
- private $buttontext = 'Save';
- function setButtontext($v){
- $this->buttontext = $v;
- }
+ $bootmenufield->setRegisterInArrayValidator(false);
+ $this->addElement($bootmenufield);
+
+ $this->addElement('text', 'priority', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Priority:',
+ ));
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => $this->buttontext,
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/filter"'
+ ));
+ }
+ function setBootmenus($val) {
+ $this->bootmenus = $val;
+ return;
+ }
+ private $buttontext = 'Save';
+ function setButtontext($v) {
+ $this->buttontext = $v;
+ }
}
diff --git a/application/modules/dev/forms/FilterEntriesAdd.php b/application/modules/dev/forms/FilterEntriesAdd.php
index d196cc9..dd15a22 100644
--- a/application/modules/dev/forms/FilterEntriesAdd.php
+++ b/application/modules/dev/forms/FilterEntriesAdd.php
@@ -1,155 +1,153 @@
-<?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_FilterEntriesAdd extends Zend_Form
-{
- private $filterID = 0;
+class dev_Form_FilterEntriesAdd extends Zend_Form {
+ private $filterID = 0;
- public function init()
- {
- $this->setName("Add Filterentry");
- $this->setMethod('post');
- $this->setAttrib('id','filterentryform');
- #print_a($this->data);
+ public function init() {
+ $this->setName("Add Filterentry");
+ $this->setMethod('post');
+ $this->setAttrib('id', 'filterentryform');
+#print_a($this->data);
- try{
- $filtertypemapper = new Application_Model_FilterTypeMapper();
- $filtertype = $filtertypemapper->fetchAll();
-
- $filtertypes = $this->createElement('select','filtertypeID');
- $filtertypes ->setLabel('Type:');
- $filtertypes ->setAttrib('id','filtertype');
- $filtertypes->addMultiOption('','');
- foreach($filtertype as $f){
- $filtertypes->addMultiOption($f->getID(),$f->getFiltertypename());
- }
- $filterentry = $filtertypes->getMultiOption($this->data['filtertypeID']);
- $filterentryID = $this->data['filtertypeID'];
- }catch (Zend_Exception $e) {
- echo "Error message 1: " . $e->getMessage() . "\n";
- }
- switch($filterentryID){
- default:
- $desc = "Select the filtertype";
- $label1 = 'Value 1:';
- $label2 = 'Value 2:';
- break;
- case "1":
- $desc = "You can set one IP or an IP-Range";
- $label1 = 'Start:';
- $label2 = 'End:';
- break;
- case "2":
- $desc = "You can set one Mac-Adress or an Mac-Range";
- $label1 = 'Start:';
- $label2 = 'End:';
- break;
- case "3":
- $desc = "Select your Pool";
- $label1 = 'PoolID:';
- break;
- case "4":
- $desc = "Select your BootIso";
- $label1 = 'BootIsoID:';
- break;
- case "5":
- $desc = "Select a Membership";
- $label1 = 'Membership:';
- break;
- case "6":
- $desc = "Select a Group";
- $label1 = 'Group:';
- break;
- case "7":
- $desc = "Specify a time-range";
- $label1 = 'Start:';
- $label2 = 'End:';
- break;
- case "8":
- $desc = "Select a Client";
- $label1 = 'Client:';
- break;
- case "9":
- $desc = "Define a Hardwarehash";
- $label1 = 'Hardwarehash:';
- break;
- case "10":
- $desc = "Specify the Weekday (Monday:1, Tuesday:2 ... Sunday:7) or a range";
- $label1 = 'Start Day:';
- $label2 = 'End Day:';
- break;
- case "11":
- $desc = "Specify the date or a day range of the filter";
- $label1 = 'Start Date:';
- $label2 = 'End Date:';
- break;
- }
- $filtertypes->setDescription($desc);
- $this->addElement($filtertypes);
-
- $this->addElement('text', 'filtervalue', array(
- 'label' => $label1,
- 'id' => 'val1'
- ));
-
- if(!in_array($filterentryID,array(3,4,5,6,8,9))){
- $this->addElement('text', 'filtervalue2', array(
- 'label' => $label2,
- 'id' => 'val2'
- ));
- }
+ try {
+ $filtertypemapper = new Application_Model_FilterTypeMapper();
+ $filtertype = $filtertypemapper->fetchAll();
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/filter"'
- ));
-
- $this->addElement('hidden', 'filterID', array(
- 'value' => $this->filterID
- ));
-
-
+ $filtertypes = $this->createElement('select', 'filtertypeID');
+ $filtertypes ->setLabel('Type:');
+ $filtertypes ->setAttrib('id', 'filtertype');
+ $filtertypes->addMultiOption('', '');
+ foreach($filtertype as $f) {
+ $filtertypes->addMultiOption($f->getID(), $f->getFiltertypename());
+ }
+ $filterentry = $filtertypes->getMultiOption($this->data['filtertypeID']);
+ $filterentryID = $this->data['filtertypeID'];
+ } catch (Zend_Exception $e) {
+ echo "Error message 1: " . $e->getMessage() . "\n";
}
+ switch($filterentryID) {
+ default:
+ $desc = "Select the filtertype";
+ $label1 = 'Value 1:';
+ $label2 = 'Value 2:';
+ break;
+ case "1":
+ $desc = "You can set one IP or an IP-Range";
+ $label1 = 'Start:';
+ $label2 = 'End:';
+ break;
+ case "2":
+ $desc = "You can set one Mac-Adress or an Mac-Range";
+ $label1 = 'Start:';
+ $label2 = 'End:';
+ break;
+ case "3":
+ $desc = "Select your Pool";
+ $label1 = 'PoolID:';
+ break;
+ case "4":
+ $desc = "Select your BootIso";
+ $label1 = 'BootIsoID:';
+ break;
+ case "5":
+ $desc = "Select a Membership";
+ $label1 = 'Membership:';
+ break;
+ case "6":
+ $desc = "Select a Group";
+ $label1 = 'Group:';
+ break;
+ case "7":
+ $desc = "Specify a time-range";
+ $label1 = 'Start:';
+ $label2 = 'End:';
+ break;
+ case "8":
+ $desc = "Select a Client";
+ $label1 = 'Client:';
+ break;
+ case "9":
+ $desc = "Define a Hardwarehash";
+ $label1 = 'Hardwarehash:';
+ break;
+ case "10":
+ $desc = "Specify the Weekday (Monday:1, Tuesday:2 ... Sunday:7) or a range";
+ $label1 = 'Start Day:';
+ $label2 = 'End Day:';
+ break;
+ case "11":
+ $desc = "Specify the date or a day range of the filter";
+ $label1 = 'Start Date:';
+ $label2 = 'End Date:';
+ break;
+ }
+ $filtertypes->setDescription($desc);
+ $this->addElement($filtertypes);
+
+ $this->addElement('text', 'filtervalue', array(
+ 'label' => $label1,
+ 'id' => 'val1'
+ ));
+
+ if(!in_array($filterentryID, array(3, 4, 5, 6, 8, 9))) {
+ $this->addElement('text', 'filtervalue2', array(
+ 'label' => $label2,
+ 'id' => 'val2'
+ ));
+ }
+
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => $this->buttontext,
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/filter"'
+ ));
+
+ $this->addElement('hidden', 'filterID', array(
+ 'value' => $this->filterID
+ ));
+
+
+ }
- private $buttontext = 'Save';
- function setButtontext($v){
- $this->buttontext = $v;
- }
- private $data ;
- function setData($v){
- $this->data = $v;
- }
- function setFilterID($v){
- $this->filterID = $v;
- }
+ private $buttontext = 'Save';
+ function setButtontext($v) {
+ $this->buttontext = $v;
+ }
+ private $data ;
+ function setData($v) {
+ $this->data = $v;
+ }
+ function setFilterID($v) {
+ $this->filterID = $v;
+ }
}
-?>
-<script type="text/javascript">
- $('#filtertype').change(function(){
- //alert($("#filtertype option:selected").val());
- $('#filterentryform').submit();
- });
- $('#val1').focusout(function(){
- if($("#filtertype option:selected").val() == 1 && $('#val2').val() == ""){
- $('#val2').val($('#val1').val());
- }
- if($("#filtertype option:selected").val() == 2 && $('#val2').val() == ""){
- $('#val2').val($('#val1').val());
- }
- });
-</script>
+? >
+< script type = "text/javascript" >
+$('#filtertype').change(function() {
+ //alert($("#filtertype option:selected").val());
+ $('#filterentryform').submit();
+});
+$('#val1').focusout(function() {
+ if($("#filtertype option:selected").val() == 1 && $('#val2').val() == "") {
+ $('#val2').val($('#val1').val());
+ }
+ if($("#filtertype option:selected").val() == 2 && $('#val2').val() == "") {
+ $('#val2').val($('#val1').val());
+ }
+});
+< / script >
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;
+ }
}
diff --git a/application/modules/dev/forms/GroupAdd.php b/application/modules/dev/forms/GroupAdd.php
index 89595e6..b0df640 100644
--- a/application/modules/dev/forms/GroupAdd.php
+++ b/application/modules/dev/forms/GroupAdd.php
@@ -1,74 +1,72 @@
-<?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_GroupAdd extends Zend_Form
-{
- private $grouplist;
+class dev_Form_GroupAdd extends Zend_Form {
+ private $grouplist;
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+ }
- public function init()
- {
- $this->setName("GroupAdd");
- $this->setMethod('post');
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
+ public function init() {
+ $this->setName("GroupAdd");
+ $this->setMethod('post');
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- ));
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
- $groupfield = $this->createElement('select','superordinatedGroupID');
- $groupfield ->setLabel('superordinated Group:');
+ $this->addElement('text', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'label' => 'Description:',
+ ));
- $groupfield->addMultiOption('-1', '---- none ----');
+ $groupfield = $this->createElement('select', 'superordinatedGroupID');
+ $groupfield ->setLabel('superordinated Group:');
- if(count($this->grouplist)>0){
- foreach($this->grouplist as $group => $g){
- $groupfield->addMultiOption($g->getID(), $g->getTitle());
- }
- }
- $groupfield->setRegisterInArrayValidator(false);
- $this->addElement($groupfield);
+ $groupfield->addMultiOption('-1', '---- none ----');
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add',
- ));
+ 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('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Add',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="javascript:history.back();"',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/GroupEdit.php b/application/modules/dev/forms/GroupEdit.php
index a3828f5..a90c7d2 100644
--- a/application/modules/dev/forms/GroupEdit.php
+++ b/application/modules/dev/forms/GroupEdit.php
@@ -1,57 +1,55 @@
-<?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_GroupEdit extends Zend_Form
-{
-
-
- public function init()
- {
- $this->setName("GroupEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- 'value' => $_POST['title'],
- ));
-
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- 'value' => $_POST['description'],
- ));
-
- $this->addElement('submit', 'save', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
-
- $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_GroupEdit extends Zend_Form {
+
+
+ public function init() {
+ $this->setName("GroupEdit");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ 'value' => $_POST['title'],
+ ));
+
+ $this->addElement('text', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'label' => 'Description:',
+ 'value' => $_POST['description'],
+ ));
+
+ $this->addElement('submit', 'save', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Save',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="javascript:history.back();"',
+ ));
+ }
}
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 @@
-<?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_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();"',
- ));
- }
+* 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();"',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/GroupRequest.php b/application/modules/dev/forms/GroupRequest.php
index 691c24b..8a1acbf 100644
--- a/application/modules/dev/forms/GroupRequest.php
+++ b/application/modules/dev/forms/GroupRequest.php
@@ -1,52 +1,50 @@
-<?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_GroupRequest extends Zend_Form
-{
- private $grouplist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function getGrouplist(){
- return $this->grouplist;
- }
-
- public function init()
- {
- $this->setName("GroupRequest");
- $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', 'request', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Request',
- ));
-
- }
+* 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_GroupRequest extends Zend_Form {
+ private $grouplist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function getGrouplist() {
+ return $this->grouplist;
+ }
+
+ public function init() {
+ $this->setName("GroupRequest");
+ $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', 'request', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Request',
+ ));
+
+ }
}
diff --git a/application/modules/dev/forms/GroupSelect.php b/application/modules/dev/forms/GroupSelect.php
index cd5dfc6..0080044 100644
--- a/application/modules/dev/forms/GroupSelect.php
+++ b/application/modules/dev/forms/GroupSelect.php
@@ -1,51 +1,49 @@
-<?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_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',
- ));
- }
+* 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_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',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/LinkRight.php b/application/modules/dev/forms/LinkRight.php
index 38a14f9..5894905 100644
--- a/application/modules/dev/forms/LinkRight.php
+++ b/application/modules/dev/forms/LinkRight.php
@@ -1,57 +1,55 @@
-<?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_LinkRight extends Zend_Form
-{
- private $rightlist;
- private $roleID;
-
- public function setRightlist($rightlist){
- $this->rightlist = $rightlist;
- }
-
- public function setRoleID($roleID){
- $this->roleID = $roleID;
- }
-
- public function init()
- {
- $this->setName("LinkRight");
- $this->setMethod('post');
-
- $rightfield = $this->createElement('select','rightID');
- $rightfield ->setLabel('Right:');
-
- if(count($this->rightlist)>0){
- foreach($this->rightlist as $right => $r){
- $rightfield->addMultiOption($r->getID(), $r->getTitle());
- }
- }
- $rightfield->setRegisterInArrayValidator(false);
- $this->addElement($rightfield);
-
- $this->addElement('submit', 'link', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add',
- ));
-
- $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_LinkRight extends Zend_Form {
+ private $rightlist;
+ private $roleID;
+
+ public function setRightlist($rightlist) {
+ $this->rightlist = $rightlist;
+ }
+
+ public function setRoleID($roleID) {
+ $this->roleID = $roleID;
+ }
+
+ public function init() {
+ $this->setName("LinkRight");
+ $this->setMethod('post');
+
+ $rightfield = $this->createElement('select', 'rightID');
+ $rightfield ->setLabel('Right:');
+
+ if(count($this->rightlist) > 0) {
+ foreach($this->rightlist as $right => $r) {
+ $rightfield->addMultiOption($r->getID(), $r->getTitle());
+ }
+ }
+ $rightfield->setRegisterInArrayValidator(false);
+ $this->addElement($rightfield);
+
+ $this->addElement('submit', 'link', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Add',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="javascript:history.back();"',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/NewPassword.php b/application/modules/dev/forms/NewPassword.php
index 4a7f1cf..ca2be56 100644
--- a/application/modules/dev/forms/NewPassword.php
+++ b/application/modules/dev/forms/NewPassword.php
@@ -1,47 +1,45 @@
-<?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_NewPassword extends Zend_Form
-{
- private $personID;
-
- public function setPersonID($personID){
- $this->personID = $personID;
- }
-
- public function init()
- {
- $this->setName("NewPassword");
- $this->setMethod('post');
-
- $this->addElement('hidden', 'personID', array(
- 'value' => $this->personID
- ));
-
- $this->addElement('password', 'password', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Password:',
- ));
-
- $this->addElement('submit', 'savePassword', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
- }
+* 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_NewPassword extends Zend_Form {
+ private $personID;
+
+ public function setPersonID($personID) {
+ $this->personID = $personID;
+ }
+
+ public function init() {
+ $this->setName("NewPassword");
+ $this->setMethod('post');
+
+ $this->addElement('hidden', 'personID', array(
+ 'value' => $this->personID
+ ));
+
+ $this->addElement('password', 'password', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Password:',
+ ));
+
+ $this->addElement('submit', 'savePassword', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Save',
+ ));
+ }
} \ No newline at end of file
diff --git a/application/modules/dev/forms/PersonEdit.php b/application/modules/dev/forms/PersonEdit.php
index 67f317c..b49ce7b 100644
--- a/application/modules/dev/forms/PersonEdit.php
+++ b/application/modules/dev/forms/PersonEdit.php
@@ -1,126 +1,124 @@
-<?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_PersonEdit extends Zend_Form
-{
-
- public function init()
- {
- $this->setName("PersonEdit");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- 'value' => $this->getView()->person->getTitle(),
- ));
-
-
- $this->addElement('text', 'name', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Name:',
- 'value' => $this->getView()->person->getName(),
- ));
-
- $this->addElement('text', 'firstname', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Firstname:',
- 'value' => $this->getView()->person->getFirstname(),
- ));
-
- $this->addElement('text', 'street', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Street:',
- 'value' => $this->getView()->person->getStreet(),
- ));
-
- $this->addElement('text', 'housenumber', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Housenumber:',
- 'value' => $this->getView()->person->getHousenumber(),
- ));
-
- $this->addElement('text', 'city', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'City:',
- 'value' => $this->getView()->person->getCity(),
- ));
-
- $this->addElement('text', 'postalcode', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Postalcode:',
- 'value' => $this->getView()->person->getPostalcode(),
- ));
-
- $this->addElement('text', 'email', array(
- 'filters' => array('StringTrim', 'StringToLower'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Email:',
- 'value' => $this->getView()->person->getEmail(),
- ));
-
- $this->addElement('password', 'newpassword', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => false,
- 'label' => 'Neues Password:',
- ));
-
- $this->addElement('submit', 'save', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
-
- $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_PersonEdit extends Zend_Form {
+
+ public function init() {
+ $this->setName("PersonEdit");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ 'value' => $this->getView()->person->getTitle(),
+ ));
+
+
+ $this->addElement('text', 'name', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Name:',
+ 'value' => $this->getView()->person->getName(),
+ ));
+
+ $this->addElement('text', 'firstname', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Firstname:',
+ 'value' => $this->getView()->person->getFirstname(),
+ ));
+
+ $this->addElement('text', 'street', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Street:',
+ 'value' => $this->getView()->person->getStreet(),
+ ));
+
+ $this->addElement('text', 'housenumber', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Housenumber:',
+ 'value' => $this->getView()->person->getHousenumber(),
+ ));
+
+ $this->addElement('text', 'city', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'City:',
+ 'value' => $this->getView()->person->getCity(),
+ ));
+
+ $this->addElement('text', 'postalcode', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Postalcode:',
+ 'value' => $this->getView()->person->getPostalcode(),
+ ));
+
+ $this->addElement('text', 'email', array(
+ 'filters' => array('StringTrim', 'StringToLower'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Email:',
+ 'value' => $this->getView()->person->getEmail(),
+ ));
+
+ $this->addElement('password', 'newpassword', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => false,
+ 'label' => 'Neues Password:',
+ ));
+
+ $this->addElement('submit', 'save', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Save',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="javascript:history.back();"',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/Pool.php b/application/modules/dev/forms/Pool.php
index 7fff200..dc2efb2 100644
--- a/application/modules/dev/forms/Pool.php
+++ b/application/modules/dev/forms/Pool.php
@@ -1,61 +1,59 @@
-<?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_Pool extends Zend_Form
-{
-
- public function init()
- {
- $this->setName("pool");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
- $this->addElement('textarea', 'description', array(
- 'filters' => array('StringTrim'),
- 'required' => false,
- 'label' => 'Description:',
- ));
- // TODO: Add target of Filter
-
- $this->addElement('text', 'location', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Location:',
- ));
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => $this->buttontext,
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/pool"'
- ));
- }
- private $buttontext = 'Save';
- function setButtontext($v){
- $this->buttontext = $v;
- }
+* 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_Pool extends Zend_Form {
+
+ public function init() {
+ $this->setName("pool");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+ $this->addElement('textarea', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'required' => false,
+ 'label' => 'Description:',
+ ));
+ // TODO: Add target of Filter
+
+ $this->addElement('text', 'location', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Location:',
+ ));
+
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => $this->buttontext,
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/pool"'
+ ));
+ }
+ private $buttontext = 'Save';
+ function setButtontext($v) {
+ $this->buttontext = $v;
+ }
}
diff --git a/application/modules/dev/forms/PoolClient.php b/application/modules/dev/forms/PoolClient.php
index 434343a..a9dc880 100644
--- a/application/modules/dev/forms/PoolClient.php
+++ b/application/modules/dev/forms/PoolClient.php
@@ -1,42 +1,40 @@
-<?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_PoolClient extends Zend_Form
-{
- private $clients;
+class dev_Form_PoolClient extends Zend_Form {
+ private $clients;
- public function init()
- {
- $this->setName("addClientToPool");
- $this->setMethod('post');
-
- $clientfield = $this->createElement('select','clientID');
- $clientfield ->setLabel('Client:');
- print_a($this->clients);
- foreach($this->clients as $c){
- $clientfield->addMultiOption($c['clientID'],$c['macadress']." - ".$c['hardwarehash']);
- }
- $this->addElement($clientfield);
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
+ public function init() {
+ $this->setName("addClientToPool");
+ $this->setMethod('post');
+
+ $clientfield = $this->createElement('select', 'clientID');
+ $clientfield ->setLabel('Client:');
+ print_a($this->clients);
+ foreach($this->clients as $c) {
+ $clientfield->addMultiOption($c['clientID'], $c['macadress']." - ".$c['hardwarehash']);
}
- public function setClients($clients){
- $this->clients = $clients;
- return $this;
- }
-
+ $this->addElement($clientfield);
+
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Save',
+ ));
+ }
+ public function setClients($clients) {
+ $this->clients = $clients;
+ return $this;
+ }
+
}
diff --git a/application/modules/dev/forms/PrebootCreate.php b/application/modules/dev/forms/PrebootCreate.php
index 2979606..5365640 100644
--- a/application/modules/dev/forms/PrebootCreate.php
+++ b/application/modules/dev/forms/PrebootCreate.php
@@ -1,72 +1,70 @@
-<?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_PrebootCreate extends Zend_Form
-{
+class dev_Form_PrebootCreate extends Zend_Form {
- private $grouplist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function init()
- {
- $this->setName("PreBootCreate");
- $this->setMethod('post');
+ private $grouplist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function init() {
+ $this->setName("PreBootCreate");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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('text', 'path_preboot', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 240)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Path to Preboot:',
- ));
-
- $this->addElement('submit', 'createpreboot', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Create Preboot',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/preboot"'
- ));
+ $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('text', 'path_preboot', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 240)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Path to Preboot:',
+ ));
+
+ $this->addElement('submit', 'createpreboot', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Create Preboot',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/dev/preboot"'
+ ));
+
+ }
+
-
}
diff --git a/application/modules/dev/forms/PrebootEdit.php b/application/modules/dev/forms/PrebootEdit.php
index 6e8268b..a691bff 100644
--- a/application/modules/dev/forms/PrebootEdit.php
+++ b/application/modules/dev/forms/PrebootEdit.php
@@ -1,69 +1,67 @@
-<?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_PrebootEdit extends Zend_Form
-{
- private $grouplist;
-
- public function setGrouplist($grouplist){
- $this->grouplist = $grouplist;
-
- }
-
- public function init()
- {
- $this->setName("PreBootEdit");
- $this->setMethod('post');
+class dev_Form_PrebootEdit extends Zend_Form {
+ private $grouplist;
+
+ public function setGrouplist($grouplist) {
+ $this->grouplist = $grouplist;
+
+ }
+
+ public function init() {
+ $this->setName("PreBootEdit");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $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('text', 'path_preboot', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 240)),
- ),
- 'required' => true,
- 'size' => 50,
- 'label' => 'Path to Preboot:',
- ));
-
- $this->addElement('submit', 'editpreboot', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Edit Preboot',
- ));
-
- $this->addElement('button', 'Cancel', array(
- 'onclick' => 'self.location="/dev/preboot"'
- ));
+ $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('text', 'path_preboot', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 240)),
+ ),
+ 'required' => true,
+ 'size' => 50,
+ 'label' => 'Path to Preboot:',
+ ));
+
+ $this->addElement('submit', 'editpreboot', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Edit Preboot',
+ ));
+
+ $this->addElement('button', 'Cancel', array(
+ 'onclick' => 'self.location="/dev/preboot"'
+ ));
+
+ }
}
diff --git a/application/modules/dev/forms/RoleAdd.php b/application/modules/dev/forms/RoleAdd.php
index a9ada27..46cf025 100644
--- a/application/modules/dev/forms/RoleAdd.php
+++ b/application/modules/dev/forms/RoleAdd.php
@@ -1,63 +1,61 @@
-<?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_RoleAdd extends Zend_Form
-{
- private $rightlist;
-
- public function setRightlist($rightlist){
- $this->rightlist = $rightlist;
- }
-
- public function init()
- {
- $this->setName("RoleAdd");
- $this->setMethod('post');
-
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- ));
-
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- ));
-
- $this->addElement('checkbox', 'inheritance', array(
- 'label' => 'Inheritance:',
- ));
-
- $this->addElement('submit', 'add', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Add',
- ));
-
- $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_RoleAdd extends Zend_Form {
+ private $rightlist;
+
+ public function setRightlist($rightlist) {
+ $this->rightlist = $rightlist;
+ }
+
+ public function init() {
+ $this->setName("RoleAdd");
+ $this->setMethod('post');
+
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ ));
+
+ $this->addElement('text', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'label' => 'Description:',
+ ));
+
+ $this->addElement('checkbox', 'inheritance', array(
+ 'label' => 'Inheritance:',
+ ));
+
+ $this->addElement('submit', 'add', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Add',
+ ));
+
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="javascript:history.back();"',
+ ));
+ }
}
diff --git a/application/modules/dev/forms/RoleEdit.php b/application/modules/dev/forms/RoleEdit.php
index 8ae4733..a36795e 100644
--- a/application/modules/dev/forms/RoleEdit.php
+++ b/application/modules/dev/forms/RoleEdit.php
@@ -1,71 +1,69 @@
-<?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_RoleEdit extends Zend_Form
-{
+class dev_Form_RoleEdit extends Zend_Form {
- public function init()
- {
- $this->setName("RoleEdit");
- $this->setMethod('post');
+ public function init() {
+ $this->setName("RoleEdit");
+ $this->setMethod('post');
- $this->addElement('text', 'title', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 50)),
- ),
- 'required' => true,
- 'label' => 'Title:',
- 'value' => $_POST['title'],
- ));
+ $this->addElement('text', 'title', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 50)),
+ ),
+ 'required' => true,
+ 'label' => 'Title:',
+ 'value' => $_POST['title'],
+ ));
- $this->addElement('text', 'description', array(
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('StringLength', false, array(0, 140)),
- ),
- 'required' => false,
- 'label' => 'Description:',
- 'value' => $_POST['description'],
- ));
+ $this->addElement('text', 'description', array(
+ 'filters' => array('StringTrim'),
+ 'validators' => array(
+ array('StringLength', false, array(0, 140)),
+ ),
+ 'required' => false,
+ 'label' => 'Description:',
+ 'value' => $_POST['description'],
+ ));
- if($_POST['inheritance'] == 1) {
- $this->addElement('checkbox', 'inheritance', array(
- 'label' => 'Inheritance:',
- 'checked' => 'checked',
- ));
- } else {
- $this->addElement('checkbox', 'inheritance', array(
- 'label' => 'Inheritance:',
- ));
- }
+ if($_POST['inheritance'] == 1) {
+ $this->addElement('checkbox', 'inheritance', array(
+ 'label' => 'Inheritance:',
+ 'checked' => 'checked',
+ ));
+ } else {
+ $this->addElement('checkbox', 'inheritance', array(
+ 'label' => 'Inheritance:',
+ ));
+ }
- $this->addElement('hidden', 'groupID', array(
- 'value' => $_POST['groupID'],
- ));
+ $this->addElement('hidden', 'groupID', array(
+ 'value' => $_POST['groupID'],
+ ));
- $this->addElement('submit', 'save', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Save',
- ));
+ $this->addElement('submit', 'save', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Save',
+ ));
- $this->addElement('button', 'cancel', array(
- 'required' => false,
- 'ignore' => true,
- 'label' => 'Cancel',
- 'onclick' => 'location.href="javascript:history.back();"',
- ));
- }
+ $this->addElement('button', 'cancel', array(
+ 'required' => false,
+ 'ignore' => true,
+ 'label' => 'Cancel',
+ 'onclick' => 'location.href="javascript:history.back();"',
+ ));
+ }
}
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;
+ }
+
}