diff --git a/public/js/airtime/schedule/add-show.js b/public/js/airtime/schedule/add-show.js index 0299754ce..480530e7e 100644 --- a/public/js/airtime/schedule/add-show.js +++ b/public/js/airtime/schedule/add-show.js @@ -183,6 +183,13 @@ function setAddShowEvents() { form.find(".add-show-submit") .click(function(event){ + var addShowButton = $(this); + if (!addShowButton.hasClass("disabled")){ + addShowButton.addClass("disabled"); + } else { + return; + } + event.preventDefault(); var data = $("form").serializeArray(); @@ -203,6 +210,7 @@ function setAddShowEvents() { var end_date = $("#add_show_end_date").val(); $.post("/Schedule/add-show", {format: "json", data: data, hosts: hosts, days: days}, function(json){ + addShowButton.removeClass("disabled"); if(json.form) { $("#add-show-form") .empty()