diff options
| author | Simon | 2011-03-14 16:09:03 +0100 |
|---|---|---|
| committer | Simon | 2011-03-14 16:09:03 +0100 |
| commit | b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c (patch) | |
| tree | fcef50ad1ddf831f457d6aecd83e7fdc63297a1c /application/forms | |
| parent | footer bleibt am fensterbottom (diff) | |
| download | pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.gz pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.xz pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.zip | |
Application in 3 Modules gesplittet, Dev = unsere entwicklungsumgebung, user = die weboberfläche fr anwender mit acl etc, fbgui = für die fbgui truppe - links in dev müssen noch angepasst werden
Diffstat (limited to 'application/forms')
26 files changed, 0 insertions, 2049 deletions
diff --git a/application/forms/AuthDelete.php b/application/forms/AuthDelete.php deleted file mode 100644 index 4e9c92d..0000000 --- a/application/forms/AuthDelete.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -class Application_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/forms/AuthLogin.php b/application/forms/AuthLogin.php deleted file mode 100644 index adffa29..0000000 --- a/application/forms/AuthLogin.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -class Application_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/forms/AuthRecoverPassword.php b/application/forms/AuthRecoverPassword.php deleted file mode 100644 index fc9478b..0000000 --- a/application/forms/AuthRecoverPassword.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -class Application_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 Password', - )); - } - - -} - diff --git a/application/forms/AuthRegister.php b/application/forms/AuthRegister.php deleted file mode 100644 index ae6e766..0000000 --- a/application/forms/AuthRegister.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php - -class Application_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/forms/BootisoCreate.php b/application/forms/BootisoCreate.php deleted file mode 100644 index 6efb0c2..0000000 --- a/application/forms/BootisoCreate.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -class Application_Form_BootisoCreate extends Zend_Form -{ - - private $grouplist; - - public function setGrouplist($grouplist){ - $this->grouplist = $grouplist; - - } - - 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); - - $this->addElement('text', 'path', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'size' => 50, - 'label' => 'Path:', - )); - - $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', 'createbootiso', array( - 'required' => false, - 'ignore' => true, - 'label' => 'Create BootISO', - )); - - $this->addElement('button', 'Cancel', array( - 'onclick' => 'self.location="/bootiso"' - )); - - } - - -} - diff --git a/application/forms/BootisoEdit.php b/application/forms/BootisoEdit.php deleted file mode 100644 index 17c87d6..0000000 --- a/application/forms/BootisoEdit.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -class Application_Form_BootisoEdit extends Zend_Form -{ - - private $grouplist; - - public function setGrouplist($grouplist){ - $this->grouplist = $grouplist; - - } - - public function init() - { - $this->setName("BootIsoEdit"); - $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', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'size' => 50, - 'label' => 'Path:', - )); - - $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:', - )); - - $this->addElement('submit', 'editbootiso', array( - 'required' => false, - 'ignore' => true, - 'label' => 'Edit BootISO', - )); - - $this->addElement('button', 'Cancel', array( - 'onclick' => 'self.location="/bootiso"' - )); - - } -} - diff --git a/application/forms/BootmenuCreate.php b/application/forms/BootmenuCreate.php deleted file mode 100644 index a6b4272..0000000 --- a/application/forms/BootmenuCreate.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -class Application_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/forms/BootmenuEdit.php b/application/forms/BootmenuEdit.php deleted file mode 100644 index 0b33643..0000000 --- a/application/forms/BootmenuEdit.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -class Application_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/forms/BootmenuEntriesAdd.php b/application/forms/BootmenuEntriesAdd.php deleted file mode 100644 index 6981619..0000000 --- a/application/forms/BootmenuEntriesAdd.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -class Application_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(); - } - - $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); - - $this->addElement('textarea', 'kcl', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'cols' => 50, - 'rows' => 5, - 'label' => 'KCL:', - 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl() - - )); - - $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="/bootmenu"' - )); - - } - - - - -} - diff --git a/application/forms/BootmenuEntriesEdit.php b/application/forms/BootmenuEntriesEdit.php deleted file mode 100644 index 6dc1aab..0000000 --- a/application/forms/BootmenuEntriesEdit.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -class Application_Form_BootmenuEntriesEdit 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(); - } - - $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); - - $this->addElement('textarea', 'kcl', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'cols' => 50, - 'rows' => 5, - 'label' => 'KCL:', - 'value' => $this->bootoslist[$_POST['bootosID']]->getDefaultkcl() - )); - - $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="/bootmenu"' - )); - - } - - -} - diff --git a/application/forms/BootosCreate.php b/application/forms/BootosCreate.php deleted file mode 100644 index 0377197..0000000 --- a/application/forms/BootosCreate.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -class Application_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, 50)), - ), - '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/forms/BootosEdit.php b/application/forms/BootosEdit.php deleted file mode 100644 index 641429d..0000000 --- a/application/forms/BootosEdit.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -class Application_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, 50)), - ), - '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/forms/Client.php b/application/forms/Client.php deleted file mode 100644 index 83df97e..0000000 --- a/application/forms/Client.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -class Application_Form_Client extends Zend_Form -{ - - public function init() - { - $this->setName("pool"); - $this->setMethod('post'); - - $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="/client"' - )); - } - private $buttontext = 'Save'; - function setButtontext($v){ - $this->buttontext = $v; - } - - -} - diff --git a/application/forms/ConfigCreate.php b/application/forms/ConfigCreate.php deleted file mode 100644 index 3aa142c..0000000 --- a/application/forms/ConfigCreate.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -class Application_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/forms/ConfigEdit.php b/application/forms/ConfigEdit.php deleted file mode 100644 index 53219d9..0000000 --- a/application/forms/ConfigEdit.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -class Application_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/forms/FilterAdd.php b/application/forms/FilterAdd.php deleted file mode 100644 index b720089..0000000 --- a/application/forms/FilterAdd.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -class Application_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/forms/FilterEntriesAdd.php b/application/forms/FilterEntriesAdd.php deleted file mode 100644 index 9f9c642..0000000 --- a/application/forms/FilterEntriesAdd.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -class Application_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> - $('#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/forms/FilterEvaluate.php b/application/forms/FilterEvaluate.php deleted file mode 100644 index b7c2b51..0000000 --- a/application/forms/FilterEvaluate.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php - -class Application_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('/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/forms/GroupAdd.php b/application/forms/GroupAdd.php deleted file mode 100644 index 7df3af5..0000000 --- a/application/forms/GroupAdd.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -class Application_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="/group/show"', - )); - } - - -} - diff --git a/application/forms/GroupEdit.php b/application/forms/GroupEdit.php deleted file mode 100644 index ef38d83..0000000 --- a/application/forms/GroupEdit.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -class Application_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('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="/group/show"', - )); - } - - -} - diff --git a/application/forms/GroupLink.php b/application/forms/GroupLink.php deleted file mode 100644 index 231c4a7..0000000 --- a/application/forms/GroupLink.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -class Application_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="/group/show"', - )); - } - - -} - diff --git a/application/forms/GroupRequest.php b/application/forms/GroupRequest.php deleted file mode 100644 index ec717de..0000000 --- a/application/forms/GroupRequest.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -class Application_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 Membership', - )); - - } - -} - diff --git a/application/forms/PersonEdit.php b/application/forms/PersonEdit.php deleted file mode 100644 index 664daac..0000000 --- a/application/forms/PersonEdit.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php - -class Application_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="/person/show"', - )); - } - - -} - diff --git a/application/forms/Pool.php b/application/forms/Pool.php deleted file mode 100644 index be30444..0000000 --- a/application/forms/Pool.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -class Application_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/forms/PoolClient.php b/application/forms/PoolClient.php deleted file mode 100644 index 0c4ef6a..0000000 --- a/application/forms/PoolClient.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -class Application_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/forms/Session.php b/application/forms/Session.php deleted file mode 100644 index 8603f75..0000000 --- a/application/forms/Session.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php - -class Application_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; - } - - -} - |
