From 2ab5e6b26a73e1149e58d74067ce72cd355156e1 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 25 Sep 2013 16:17:20 -0400 Subject: [PATCH] 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 --- airtime_mvc/public/js/airtime/schedule/add-show.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index fd2625559..7921dfd9a 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -481,6 +481,13 @@ function setAddShowEvents() { 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 hosts = $('#add_show_hosts-element input').map(function() { @@ -504,7 +511,7 @@ function setAddShowEvents() { }); var action = baseUrl+"Schedule/"+String(addShowButton.attr("data-action")); - + $.post(action, {format: "json", data: data, hosts: hosts, days: days}, function(json){ //addShowButton.removeClass("disabled"); $('#schedule-add-show').unblock();