diff options
| author | Sebastian Schmelzer | 2012-01-11 15:22:32 +0100 |
|---|---|---|
| committer | Sebastian Schmelzer | 2012-01-11 15:22:32 +0100 |
| commit | 83767be80c29e3d3ca99f4a7d2eaab97f8256d1b (patch) | |
| tree | 354ee1ba3343291cd389aea69582d677fb7b8a26 /application/modules/dev/forms | |
| parent | fix stylecode output (diff) | |
| download | pbs2-83767be80c29e3d3ca99f4a7d2eaab97f8256d1b.tar.gz pbs2-83767be80c29e3d3ca99f4a7d2eaab97f8256d1b.tar.xz pbs2-83767be80c29e3d3ca99f4a7d2eaab97f8256d1b.zip | |
remove unused stuff
Diffstat (limited to 'application/modules/dev/forms')
34 files changed, 0 insertions, 2804 deletions
diff --git a/application/modules/dev/forms/AuthDelete.php b/application/modules/dev/forms/AuthDelete.php deleted file mode 100644 index dda4f14..0000000 --- a/application/modules/dev/forms/AuthDelete.php +++ /dev/null @@ -1,36 +0,0 @@ -<?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_AuthDelete extends Zend_Form { - - 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', - )); - } - - -} - diff --git a/application/modules/dev/forms/AuthLogin.php b/application/modules/dev/forms/AuthLogin.php deleted file mode 100644 index 56d6e79..0000000 --- a/application/modules/dev/forms/AuthLogin.php +++ /dev/null @@ -1,46 +0,0 @@ -<?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', - )); - } - - -} - diff --git a/application/modules/dev/forms/AuthRecoverPassword.php b/application/modules/dev/forms/AuthRecoverPassword.php deleted file mode 100644 index 4c84b8e..0000000 --- a/application/modules/dev/forms/AuthRecoverPassword.php +++ /dev/null @@ -1,36 +0,0 @@ -<?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_AuthRecoverPassword extends Zend_Form { - - 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', - )); - } - - -} - diff --git a/application/modules/dev/forms/AuthRegister.php b/application/modules/dev/forms/AuthRegister.php deleted file mode 100644 index 8860467..0000000 --- a/application/modules/dev/forms/AuthRegister.php +++ /dev/null @@ -1,113 +0,0 @@ -<?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', - )); - - - } - - - -} - diff --git a/application/modules/dev/forms/BootisoCreate.php b/application/modules/dev/forms/BootisoCreate.php deleted file mode 100644 index d273f69..0000000 --- a/application/modules/dev/forms/BootisoCreate.php +++ /dev/null @@ -1,117 +0,0 @@ -<?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; - - } - - - 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"' - )); - - } - - -} - diff --git a/application/modules/dev/forms/BootisoEdit.php b/application/modules/dev/forms/BootisoEdit.php deleted file mode 100644 index ef8f9eb..0000000 --- a/application/modules/dev/forms/BootisoEdit.php +++ /dev/null @@ -1,109 +0,0 @@ -<?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; - - } - - - 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"' - )); - - } -} - diff --git a/application/modules/dev/forms/BootmenuCreate.php b/application/modules/dev/forms/BootmenuCreate.php deleted file mode 100644 index 3b5ada6..0000000 --- a/application/modules/dev/forms/BootmenuCreate.php +++ /dev/null @@ -1,59 +0,0 @@ -<?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"' - )); - - } - - -} - diff --git a/application/modules/dev/forms/BootmenuEdit.php b/application/modules/dev/forms/BootmenuEdit.php deleted file mode 100644 index f171c94..0000000 --- a/application/modules/dev/forms/BootmenuEdit.php +++ /dev/null @@ -1,59 +0,0 @@ -<?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"' - )); - - } - -} - diff --git a/application/modules/dev/forms/BootmenuEntriesAdd.php b/application/modules/dev/forms/BootmenuEntriesAdd.php deleted file mode 100644 index c42a30c..0000000 --- a/application/modules/dev/forms/BootmenuEntriesAdd.php +++ /dev/null @@ -1,146 +0,0 @@ -<?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; - } - - 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; - } - - $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"' - )); - - } - - - - -} - diff --git a/application/modules/dev/forms/BootmenuEntriesEdit.php b/application/modules/dev/forms/BootmenuEntriesEdit.php deleted file mode 100644 index c37a38d..0000000 --- a/application/modules/dev/forms/BootmenuEntriesEdit.php +++ /dev/null @@ -1,148 +0,0 @@ -<?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; - } - - 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; } - } - - $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"' - )); - - } - - -} - diff --git a/application/modules/dev/forms/BootosCreate.php b/application/modules/dev/forms/BootosCreate.php deleted file mode 100644 index 0c00896..0000000 --- a/application/modules/dev/forms/BootosCreate.php +++ /dev/null @@ -1,143 +0,0 @@ -<?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; - - } - - 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"' - )); - - } - - -} - diff --git a/application/modules/dev/forms/BootosEdit.php b/application/modules/dev/forms/BootosEdit.php deleted file mode 100644 index 00854c6..0000000 --- a/application/modules/dev/forms/BootosEdit.php +++ /dev/null @@ -1,153 +0,0 @@ -<?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; - - } - - 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"' - )); - - } - - -} - - - diff --git a/application/modules/dev/forms/Client.php b/application/modules/dev/forms/Client.php deleted file mode 100644 index 426587c..0000000 --- a/application/modules/dev/forms/Client.php +++ /dev/null @@ -1,67 +0,0 @@ -<?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_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:', - )); - - $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 deleted file mode 100644 index 1499bd5..0000000 --- a/application/modules/dev/forms/ConfigCreate.php +++ /dev/null @@ -1,71 +0,0 @@ -<?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_ConfigCreate extends Zend_Form { - - 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:', - )); - - $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 deleted file mode 100644 index e4e687b..0000000 --- a/application/modules/dev/forms/ConfigEdit.php +++ /dev/null @@ -1,70 +0,0 @@ -<?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_ConfigEdit extends Zend_Form { - private $grouplist; - - public function setGrouplist($grouplist) { - $this->grouplist = $grouplist; - - } - - 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"' - )); - - } - -} - diff --git a/application/modules/dev/forms/ConfirmDeleteAccount.php b/application/modules/dev/forms/ConfirmDeleteAccount.php deleted file mode 100644 index 7c56ed4..0000000 --- a/application/modules/dev/forms/ConfirmDeleteAccount.php +++ /dev/null @@ -1,33 +0,0 @@ -<?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_ConfirmDeleteAccount extends Zend_Form { - - public function init() { - $this->setName("ConfirmDeleteAccount"); - $this->setMethod('post'); - - $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 deleted file mode 100644 index 836218e..0000000 --- a/application/modules/dev/forms/FilterAdd.php +++ /dev/null @@ -1,73 +0,0 @@ -<?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_FilterAdd extends Zend_Form { - private $bootmenus; - - 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:'); - - if(count($this->bootmenus) > 0) { - foreach($this->bootmenus as $id => $g) { - $bootmenufield->addMultiOption($g->getID(), $g->getTitle()); - } - } - $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 deleted file mode 100644 index f76a6f4..0000000 --- a/application/modules/dev/forms/FilterEntriesAdd.php +++ /dev/null @@ -1,153 +0,0 @@ -<?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_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); - - 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' - )); - } - - $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; - } -} - -? > -< 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 deleted file mode 100644 index 2aebc0f..0000000 --- a/application/modules/dev/forms/FilterEvaluate.php +++ /dev/null @@ -1,138 +0,0 @@ -<?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_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'); - - $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!', - )); - } - 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 deleted file mode 100644 index 9349b17..0000000 --- a/application/modules/dev/forms/GroupAdd.php +++ /dev/null @@ -1,73 +0,0 @@ -<?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_GroupAdd extends Zend_Form { - private $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:', - )); - - $this->addElement('text', 'description', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 140)), - ), - 'required' => false, - 'label' => 'Description:', - )); - - $groupfield = $this->createElement('select', 'superordinatedGroupID'); - $groupfield ->setLabel('superordinated Group:'); - - $groupfield->addMultiOption('-1', '---- none ----'); - - 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', '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 deleted file mode 100644 index 222d03a..0000000 --- a/application/modules/dev/forms/GroupEdit.php +++ /dev/null @@ -1,56 +0,0 @@ -<?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();"', - )); - } - - -} - diff --git a/application/modules/dev/forms/GroupLink.php b/application/modules/dev/forms/GroupLink.php deleted file mode 100644 index 4ebfaa1..0000000 --- a/application/modules/dev/forms/GroupLink.php +++ /dev/null @@ -1,63 +0,0 @@ -<?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();"', - )); - } - - -} - diff --git a/application/modules/dev/forms/GroupRequest.php b/application/modules/dev/forms/GroupRequest.php deleted file mode 100644 index 867cc0d..0000000 --- a/application/modules/dev/forms/GroupRequest.php +++ /dev/null @@ -1,50 +0,0 @@ -<?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', - )); - - } - -} - diff --git a/application/modules/dev/forms/GroupSelect.php b/application/modules/dev/forms/GroupSelect.php deleted file mode 100644 index a2cf1e6..0000000 --- a/application/modules/dev/forms/GroupSelect.php +++ /dev/null @@ -1,50 +0,0 @@ -<?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', - )); - } - - -} - diff --git a/application/modules/dev/forms/LinkRight.php b/application/modules/dev/forms/LinkRight.php deleted file mode 100644 index 4269bd8..0000000 --- a/application/modules/dev/forms/LinkRight.php +++ /dev/null @@ -1,56 +0,0 @@ -<?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();"', - )); - } - - -} - diff --git a/application/modules/dev/forms/NewPassword.php b/application/modules/dev/forms/NewPassword.php deleted file mode 100644 index 68304c4..0000000 --- a/application/modules/dev/forms/NewPassword.php +++ /dev/null @@ -1,45 +0,0 @@ -<?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', - )); - } - - -}
\ No newline at end of file diff --git a/application/modules/dev/forms/PersonEdit.php b/application/modules/dev/forms/PersonEdit.php deleted file mode 100644 index 4f81c29..0000000 --- a/application/modules/dev/forms/PersonEdit.php +++ /dev/null @@ -1,125 +0,0 @@ -<?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();"', - )); - } - - -} - diff --git a/application/modules/dev/forms/Pool.php b/application/modules/dev/forms/Pool.php deleted file mode 100644 index dd6e170..0000000 --- a/application/modules/dev/forms/Pool.php +++ /dev/null @@ -1,60 +0,0 @@ -<?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; - } - - -} - diff --git a/application/modules/dev/forms/PoolClient.php b/application/modules/dev/forms/PoolClient.php deleted file mode 100644 index 0a87280..0000000 --- a/application/modules/dev/forms/PoolClient.php +++ /dev/null @@ -1,40 +0,0 @@ -<?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_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 setClients($clients) { - $this->clients = $clients; - return $this; - } - -} - diff --git a/application/modules/dev/forms/PrebootCreate.php b/application/modules/dev/forms/PrebootCreate.php deleted file mode 100644 index 8aa6063..0000000 --- a/application/modules/dev/forms/PrebootCreate.php +++ /dev/null @@ -1,70 +0,0 @@ -<?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_PrebootCreate extends Zend_Form { - - 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:', - )); - - $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 deleted file mode 100644 index cb9e622..0000000 --- a/application/modules/dev/forms/PrebootEdit.php +++ /dev/null @@ -1,67 +0,0 @@ -<?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_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:', - )); - - $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 deleted file mode 100644 index 36badf2..0000000 --- a/application/modules/dev/forms/RoleAdd.php +++ /dev/null @@ -1,62 +0,0 @@ -<?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();"', - )); - } - - -} - diff --git a/application/modules/dev/forms/RoleEdit.php b/application/modules/dev/forms/RoleEdit.php deleted file mode 100644 index 9020967..0000000 --- a/application/modules/dev/forms/RoleEdit.php +++ /dev/null @@ -1,70 +0,0 @@ -<?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_RoleEdit extends Zend_Form { - - 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', '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:', - )); - } - - $this->addElement('hidden', 'groupID', array( - 'value' => $_POST['groupID'], - )); - - $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/Session.php b/application/modules/dev/forms/Session.php deleted file mode 100644 index 88b45ab..0000000 --- a/application/modules/dev/forms/Session.php +++ /dev/null @@ -1,147 +0,0 @@ -<?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"' - )); - } - 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; - } - - -} - |
