diff --git a/templates/backOffice/default/modules.html b/templates/backOffice/default/modules.html index 948665ff5..05ead14e4 100644 --- a/templates/backOffice/default/modules.html +++ b/templates/backOffice/default/modules.html @@ -103,7 +103,8 @@ var url_management = "{url path="/admin/module/toggle-activation/"}"; $(".module-activation").on("switch-change", function(e, data){ - var module_id = $(this).data('id'); + var checkbox = $(this); + var module_id = checkbox.data('id'); var is_checked = data.value; $('body').append(''); @@ -120,6 +121,7 @@ }) .fail(function(jqXHR, textStatus, errorThrown){ + checkbox.bootstrapSwitch('toggleState', true); $("#loading-event").remove(); $('#module-failed-body').html(jqXHR.responseJSON.error); $("#module-failed").modal("show"); @@ -154,6 +156,7 @@ }); + {/block} {block name="javascript-last-call"}