SAAS-957: Error on "update show"

This commit is contained in:
drigato 2015-07-17 16:28:33 -04:00
parent 7f4fbf65e1
commit a6854ea507

View file

@ -48,7 +48,6 @@ function toggleAddShowButton(){
} }
function setupStartTimeWidgets() { function setupStartTimeWidgets() {
if ($('input[name=add_show_start_now]:checked').val() == 'now') { if ($('input[name=add_show_start_now]:checked').val() == 'now') {
$('#add_show_start_date').prop('disabled', 'true'); $('#add_show_start_date').prop('disabled', 'true');
$('#add_show_start_time').prop('disabled', 'true'); $('#add_show_start_time').prop('disabled', 'true');
@ -66,9 +65,17 @@ function setupStartTimeWidgets() {
$('#add_show_end_time').val(nowShowEnd.format('HH:mm')); $('#add_show_end_time').val(nowShowEnd.format('HH:mm'));
} else { } else {
//Prevent enabling of elements that should always be disabled.
//i.e. when editing a show that has already started
if (!$('#add_show_start_date').prop('disabled')) {
$('#add_show_start_date').removeProp('disabled'); $('#add_show_start_date').removeProp('disabled');
}
if (!$('#add_show_start_time').prop('disabled')) {
$('#add_show_start_time').removeProp('disabled'); $('#add_show_start_time').removeProp('disabled');
} }
}
} }
//$el is DOM element #add-show-form //$el is DOM element #add-show-form