From 3414855d2fd3b8a754a6d6eee0d27c4b1831da18 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Wed, 11 Jan 2012 15:35:59 +0100 Subject: fix stylecode output --- application/modules/user/forms/Bootiso.php | 128 +++++++++++++++-------------- 1 file changed, 66 insertions(+), 62 deletions(-) (limited to 'application/modules/user/forms/Bootiso.php') diff --git a/application/modules/user/forms/Bootiso.php b/application/modules/user/forms/Bootiso.php index 0daa566..ba19437 100644 --- a/application/modules/user/forms/Bootiso.php +++ b/application/modules/user/forms/Bootiso.php @@ -35,30 +35,33 @@ class user_Form_Bootiso extends Zend_Form { $this->setMethod('post'); if (!Pbs_Acl::checkRight('be') && $this->action == 'editbootiso') - { $meta = true; } + { + $meta = true; + } else - { $meta = null; } + { $meta = null; + } $this->addElement('text', 'title', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => true, - 'label' => 'Title:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'label' => 'Title:', + )); $this->addElement('textarea', 'description', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'required' => false, - 'rows' => 5, - 'cols' => 50, - 'label' => 'Description:', - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'rows' => 5, + 'cols' => 50, + 'label' => 'Description:', + )); $prebootfield = $this->createElement('select', 'prebootID'); $prebootfield->setLabel('Preboot:'); @@ -74,32 +77,34 @@ class user_Form_Bootiso extends Zend_Form { $serial = time(); for($i = 2; $i < 14; $i += 3) - { $serial = substr($serial, 0, $i) .'-'. substr($serial, $i, strlen($serial)); } + { + $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:', - 'readOnly' => $meta, - 'value' => $serial - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => true, + 'size' => 50, + 'label' => 'Serialnumber:', + 'readOnly' => $meta, + '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:', - 'readOnly' => $meta, - 'value' => $date->format('Y-m-d'), - )); + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(0, 50)), + ), + 'required' => false, + 'label' => 'Expires:', + 'readOnly' => $meta, + 'value' => $date->format('Y-m-d'), + )); $publicfield = $this->createElement('select', 'public'); $publicfield->setLabel('Public:'); @@ -117,22 +122,25 @@ class user_Form_Bootiso extends Zend_Form { $this->addElement($publicfield); if($this->action == "createbootiso") - { $label = "Create BootMedium"; } + { + $label = "Create BootMedium"; + } else - { $label = "Edit BootMedium"; } + { $label = "Edit BootMedium"; + } $this->addElement('submit', $this->action, array( - 'required' => false, - 'ignore' => true, - 'label' => $label, - )); + 'required' => false, + 'ignore' => true, + 'label' => $label, + )); $this->addElement('button', 'Cancel', array( - 'onclick' => 'self.location="/user/bootiso/index/page/'.$this->page.'"' - )); - ? > + 'onclick' => 'self.location="/user/bootiso/index/page/'.$this->page.'"' + )); + ?> - < script type = "text/javascript" > + +
+
+ Please select a public level +
+
+ +?> -- cgit v1.2.3-55-g7522