CC-2116 : Add Extra Form Validation For Rebroadcasts
adding check for time fields since zend passes 09:0f setting min date on rebroadcast date picker to be start date of show.
This commit is contained in:
parent
8f8bd68849
commit
b59e7aef32
|
@ -36,8 +36,8 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -69,8 +69,8 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -102,8 +102,8 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -135,8 +135,8 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -168,8 +168,8 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
|
|
@ -33,8 +33,8 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -58,8 +58,8 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -83,8 +83,8 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -108,8 +108,8 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
@ -133,8 +133,8 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
|
|||
'value' => '',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
|
|
|
@ -31,7 +31,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm')),
|
||||
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
|
||||
)
|
||||
));
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ function startDpSelect(dateText, inst) {
|
|||
date = new Date(time[0], time[1] - 1, time[2]);
|
||||
|
||||
$("#add_show_end_date").datepicker("option", "minDate", date);
|
||||
$('input[name^="add_show_rebroadcast_absolute_date"]').datepicker("option", "minDate", date);
|
||||
}
|
||||
|
||||
function endDpSelect(dateText, inst) {
|
||||
|
@ -144,7 +145,7 @@ function setAddShowEvents() {
|
|||
});
|
||||
|
||||
form.find('input[name^="add_show_rebroadcast_absolute_date"]').datepicker({
|
||||
//minDate: new Date(),
|
||||
minDate: new Date(),
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
form.find('input[name^="add_show_rebroadcast_absolute_time"], input[name^="add_show_rebroadcast_time"]').timepicker({
|
||||
|
|
Loading…
Reference in New Issue