CC-5277: Selecting weekly repeat without selecting days fails silently
- added a check in the 'when' form since the validation there relies on the repeat form being valid - added validation for this in the 'repeat' form
This commit is contained in:
parent
3d9bc85fa0
commit
1e59ab836d
|
@ -104,6 +104,10 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($formData['add_show_day_check'])) {
|
||||||
|
$this->getElement('add_show_day_check')->setErrors(array(_('Please select a repeat day')));
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -211,13 +211,17 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
$overlapping = Application_Model_Schedule::checkOverlappingShows(
|
$overlapping = Application_Model_Schedule::checkOverlappingShows(
|
||||||
$show_start, $show_end);
|
$show_start, $show_end);
|
||||||
}
|
}
|
||||||
//$overlapping = Application_Model_Schedule::checkOverlappingShows($show_start, $show_end, $update, $instanceId);
|
|
||||||
|
|
||||||
/* Check if repeats overlap with previously scheduled shows
|
/* Check if repeats overlap with previously scheduled shows
|
||||||
* Do this for each show day
|
* Do this for each show day
|
||||||
*/
|
*/
|
||||||
if (!$overlapping) {
|
if (!$overlapping) {
|
||||||
$startDow = date("w", $show_start->getTimestamp());
|
$startDow = date("w", $show_start->getTimestamp());
|
||||||
|
|
||||||
|
if (!isset($formData['add_show_day_check'])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($formData["add_show_day_check"] as $day) {
|
foreach ($formData["add_show_day_check"] as $day) {
|
||||||
$repeatShowStart = clone $show_start;
|
$repeatShowStart = clone $show_start;
|
||||||
$repeatShowEnd = clone $show_end;
|
$repeatShowEnd = clone $show_end;
|
||||||
|
|
Loading…
Reference in New Issue