From 4d141b993337331b61945cc02c43cb15d89714e9 Mon Sep 17 00:00:00 2001 From: michael pereira Date: Thu, 21 Apr 2011 15:55:59 +0200 Subject: Preboot gefixt --- application/modules/user/forms/Preboot.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'application/modules/user/forms/Preboot.php') diff --git a/application/modules/user/forms/Preboot.php b/application/modules/user/forms/Preboot.php index 634b2b7..54dc216 100644 --- a/application/modules/user/forms/Preboot.php +++ b/application/modules/user/forms/Preboot.php @@ -33,6 +33,12 @@ class user_Form_Preboot extends Zend_Form else $meta = null; + if($this->action == 'editpreboot') + $filereq = false; + else + $filereq = true; + + $this->addElement('text', 'title', array( 'filters' => array('StringTrim'), 'validators' => array( @@ -45,7 +51,7 @@ class user_Form_Preboot extends Zend_Form $this->addElement('textarea', 'description', array( 'filters' => array('StringTrim'), 'validators' => array( - array('StringLength', false, array(0, 50)), + array('StringLength', false, array(0, 140)), ), 'required' => false, 'rows' => 5, @@ -54,7 +60,8 @@ class user_Form_Preboot extends Zend_Form )); $this->addElement('file', 'preboot', array( - 'required' => true, + 'validators' => array(array('Extension', false, array('zip'))), + 'required' => $filereq, 'readOnly' => $meta, 'label' => 'Preboot:', )); -- cgit v1.2.3-55-g7522