From 6b36736bb4490d91c4fb2425439010d287a39caa Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Fri, 24 Oct 2014 11:29:03 -0400
Subject: [PATCH] Blueprint cart fix: errors in cart no longer close lightbox.

---
 themes/blueprint/js/lightbox.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/themes/blueprint/js/lightbox.js b/themes/blueprint/js/lightbox.js
index afcd2015e3b..f6484dd2da5 100644
--- a/themes/blueprint/js/lightbox.js
+++ b/themes/blueprint/js/lightbox.js
@@ -72,7 +72,7 @@ function displayLightboxFeedback($form, message, type) {
 function displayFormError($form, error) {
     $form.parent().find('.error').remove();
     $form.prepend('<div class="error">' + error + '</div>');
-    if (Recaptcha) {
+    if (typeof Recaptcha != "undefined") {
       Recaptcha.reload();
     }
 }
@@ -167,6 +167,7 @@ function registerAjaxCart() {
 
     var $form = $('#modalDialog form[name="cartForm"]');
     if($form) {
+        $($form).submit(function(){return false;});
         $("input[name='ids[]']", $form).attr('checked', false);
         $($form).validate({
             rules: {
-- 
GitLab