From 0f9b83c098845490e8e61dde2ffa6e2b54472ae2 Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Wed, 12 Nov 2014 15:11:27 -0500
Subject: [PATCH] Remove spinners when submit event prevented.

---
 themes/bootstrap3/js/lightbox.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js
index c921b2e5aa5..2fffedc84ef 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);
         });
-- 
GitLab