diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index c921b2e5aa5aa9e7deab3cb58103e789e246d089..2fffedc84ef7874b09f7cf116ab295ebed23646d 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -338,14 +338,20 @@ var Lightbox = { // Default action, with custom callback } else if(typeof Lightbox.formCallbacks[name] !== "undefined") { $form.submit(function(evt){ - if(evt.isDefaultPrevented()) return false; + if(evt.isDefaultPrevented()) { + $('.fa.fa-spinner', evt.target).remove(); + return false; + } Lightbox.submit($(evt.target), Lightbox.formCallbacks[name]); return false; }); // Default } else { $form.unbind('submit').submit(function(evt){ - if(evt.isDefaultPrevented()) return false; + if(evt.isDefaultPrevented()) { + $('.fa.fa-spinner', evt.target).remove(); + return false; + } Lightbox.submit($(evt.target), function(html){ Lightbox.checkForError(html, Lightbox.close); });