cannot schedule anything in a show that overlaps.
This commit is contained in:
parent
74210b4c6d
commit
c0d379e306
|
@ -295,6 +295,12 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$show = new ShowInstance($showInstanceId);
|
||||
$start_timestamp = $show->getShowStart();
|
||||
$end_timestamp = $show->getShowEnd();
|
||||
|
||||
//check to make sure show doesn't overlap.
|
||||
if(Show::getShows($start_timestamp, $end_timestamp, array($showInstanceId))) {
|
||||
$this->view->error = "cannot schedule an overlapping show.";
|
||||
return;
|
||||
}
|
||||
|
||||
$start = explode(" ", $start_timestamp);
|
||||
$end = explode(" ", $end_timestamp);
|
||||
|
|
|
@ -165,8 +165,14 @@ function buildContentDialog(json){
|
|||
}
|
||||
|
||||
function buildScheduleDialog(json){
|
||||
var dialog = $(json.dialog);
|
||||
var dialog;
|
||||
|
||||
if(json.error) {
|
||||
alert(json.error);
|
||||
return;
|
||||
}
|
||||
|
||||
dialog = $(json.dialog);
|
||||
makeScheduleDialog(dialog, json);
|
||||
|
||||
dialog.dialog({
|
||||
|
|
Loading…
Reference in New Issue