diff options
Diffstat (limited to 'application/modules/user/forms/Preboot.php')
-rw-r--r-- | application/modules/user/forms/Preboot.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/application/modules/user/forms/Preboot.php b/application/modules/user/forms/Preboot.php index 75fc471..bb90f65 100644 --- a/application/modules/user/forms/Preboot.php +++ b/application/modules/user/forms/Preboot.php @@ -57,6 +57,24 @@ class user_Form_Preboot extends Zend_Form { 'cols' => 50, 'label' => 'Description:', )); + + $serial = time(); + for($i = 2; $i < 14; $i += 3) + { + $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 + )); $this->addElement('file', 'preboot', array( 'validators' => array(array('Extension', false, array('zip'))), |