diff options
| author | Simon | 2011-04-21 17:13:59 +0200 |
|---|---|---|
| committer | Simon | 2011-04-21 17:13:59 +0200 |
| commit | 851c7a2f0975f809c4ee603c902548180f55d0f1 (patch) | |
| tree | 3b4f38af347660780910616260321e02d6880754 /application/modules/user/forms/Preboot.php | |
| parent | Kleine Änderungen (diff) | |
| parent | cleanup (diff) | |
| download | pbs2-851c7a2f0975f809c4ee603c902548180f55d0f1.tar.gz pbs2-851c7a2f0975f809c4ee603c902548180f55d0f1.tar.xz pbs2-851c7a2f0975f809c4ee603c902548180f55d0f1.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules/user/forms/Preboot.php')
| -rw-r--r-- | application/modules/user/forms/Preboot.php | 11 |
1 files changed, 9 insertions, 2 deletions
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:', )); |
