diff options
Diffstat (limited to 'application/modules/user/forms/Bootos.php')
| -rw-r--r-- | application/modules/user/forms/Bootos.php | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/application/modules/user/forms/Bootos.php b/application/modules/user/forms/Bootos.php index d9cd24f..c4b1c70 100644 --- a/application/modules/user/forms/Bootos.php +++ b/application/modules/user/forms/Bootos.php @@ -42,6 +42,11 @@ class user_Form_Bootos extends Zend_Form $meta = true; else $meta = null; + + if($this->action == 'editbootos') + $filereq = false; + else + $filereq = true; $this->addElement('text', 'title', array( 'filters' => array('StringTrim'), @@ -75,16 +80,6 @@ class user_Form_Bootos extends Zend_Form 'label' => 'Default-KCL:', )); - $this->addElement('text', 'source', array( - 'filters' => array('StringTrim'), - 'validators' => array( - array('StringLength', false, array(0, 140)), - ), - 'required' => false, - 'readOnly' => $meta, - 'label' => 'Source:', - )); - $this->addElement('text', 'distro', array( 'filters' => array('StringTrim'), 'validators' => array( @@ -125,6 +120,25 @@ class user_Form_Bootos extends Zend_Form 'label' => 'Share:', )); + $this->addElement('file', 'kernel', array( + 'required' => $filereq, + 'readOnly' => $meta, + 'label' => 'Kernel:', + )); + + $this->addElement('file', 'init', array( + 'required' => $filereq, + 'readOnly' => $meta, + 'label' => 'Initramfs:', + )); + + $this->addElement('file', 'config', array( + 'validators' => array(array('Extension', false, array('tgz'))), + 'required' => $filereq, + 'readOnly' => $meta, + 'label' => 'Config:', + )); + $date = new DateTime(); $date->add(new DateInterval('P1Y')); $this->addElement('text', 'expires', array( |
