CC-5344: Edit Recorded Show -> Rebroadcasts get deleted
When editing a show the record option was getting posted with a false value even if the value was true. This was caused because on show-edit action the record form field is disabled
This commit is contained in:
parent
e47b446804
commit
2ab5e6b26a
|
@ -481,6 +481,13 @@ function setAddShowEvents() {
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
//when editing a show, the record option is disabled
|
||||||
|
//we have to enable it to get the correct value when
|
||||||
|
//we call serializeArray()
|
||||||
|
if (form.find("#add_show_record").attr("disabled", true)) {
|
||||||
|
form.find("#add_show_record").attr("disabled", false);
|
||||||
|
}
|
||||||
|
|
||||||
var data = $("form").serializeArray();
|
var data = $("form").serializeArray();
|
||||||
|
|
||||||
var hosts = $('#add_show_hosts-element input').map(function() {
|
var hosts = $('#add_show_hosts-element input').map(function() {
|
||||||
|
@ -504,7 +511,7 @@ function setAddShowEvents() {
|
||||||
});
|
});
|
||||||
|
|
||||||
var action = baseUrl+"Schedule/"+String(addShowButton.attr("data-action"));
|
var action = baseUrl+"Schedule/"+String(addShowButton.attr("data-action"));
|
||||||
|
|
||||||
$.post(action, {format: "json", data: data, hosts: hosts, days: days}, function(json){
|
$.post(action, {format: "json", data: data, hosts: hosts, days: days}, function(json){
|
||||||
//addShowButton.removeClass("disabled");
|
//addShowButton.removeClass("disabled");
|
||||||
$('#schedule-add-show').unblock();
|
$('#schedule-add-show').unblock();
|
||||||
|
|
Loading…
Reference in New Issue