default fade shows in preferences "00:00:00.000000"
This commit is contained in:
parent
d9118fe2d0
commit
2f796f3d9c
1 changed files with 9 additions and 3 deletions
|
@ -17,14 +17,21 @@ class Application_Form_Preferences extends Zend_Form
|
||||||
'value' => Application_Model_Preference::GetValue("station_name")
|
'value' => Application_Model_Preference::GetValue("station_name")
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$defaultFade = Application_Model_Preference::GetValue("default_fade");
|
||||||
|
if($defaultFade == ""){
|
||||||
|
$defaultFade = '00:00:00.000000';
|
||||||
|
}
|
||||||
|
|
||||||
// Add login element
|
// Add login element
|
||||||
$this->addElement('text', 'stationDefaultFade', array(
|
$this->addElement('text', 'stationDefaultFade', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'label' => 'Default Fade:',
|
'label' => 'Default Fade:',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(array('regex', false, array('/^[0-2][0-3]:[0-5][0-9]:[0-5][0-9](\.\d{1,6})?$/', 'messages' => 'enter a time 00:00:00{.000000}'))),
|
'validators' => array(array('regex', false,
|
||||||
'value' => Application_Model_Preference::GetValue("default_fade")
|
array('/^[0-2][0-3]:[0-5][0-9]:[0-5][0-9](\.\d{1,6})?$/',
|
||||||
|
'messages' => 'enter a time 00:00:00{.000000}'))),
|
||||||
|
'value' => $defaultFade
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->addElement('submit', 'submit', array(
|
$this->addElement('submit', 'submit', array(
|
||||||
|
@ -34,4 +41,3 @@ class Application_Form_Preferences extends Zend_Form
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
///^[0-2][0-3]:[0-5][0-9]:[0-5][0-9]{.}[0-9]{0-6}/i
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue