]> _ Git - fluidbook-html5.git/commitdiff
wait #6888
authorsoufiane <soufiane@cubedesigners.com>
Mon, 6 May 2024 12:57:31 +0000 (14:57 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 6 May 2024 12:57:31 +0000 (14:57 +0200)
js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js
style/cart/bastide-resah.less

index e6cb53681c35d92cb906603bd5206fefa360861d..233c0b926d554aa109c6a8cae59c5a1a41e26e35 100644 (file)
@@ -45,6 +45,11 @@ FluidbookCartBastideResahGuest.prototype = {
             $this.resetpass(formData)
         })
 
+        $(document).on("submit", "#Bastide_register_form,#Bastide_forgotpass_form,#Bastide_resetpass_form", function() {
+            let el = $(this).find('button[type="submit"]')
+            $this.disabledSubmitButton(el)
+        })
+
         /*$(document).on("submit", 'form', function (e) {
             e.preventDefault()
             let action = $(this).attr('action')
@@ -250,6 +255,9 @@ FluidbookCartBastideResahGuest.prototype = {
             error: function(xhr, status, error) {
                 let errorsMessage = JSON.parse(xhr.responseText);
                 $this.displayErrors(errorsMessage)
+            },
+            complete: function() {
+                $this.disabledSubmitButton($("button[type=submit]"))
             }
         });
     },
@@ -283,9 +291,11 @@ FluidbookCartBastideResahGuest.prototype = {
                 $this.updateDataContent()
             },
             error: function(xhr, status, error) {
-
                 let errorsMessage = JSON.parse(xhr.responseText);
                 $this.displayErrors(errorsMessage)
+            },
+            complete: function() {
+                $this.disabledSubmitButton($("button[type=submit]"))
             }
         })
     },
@@ -306,4 +316,8 @@ FluidbookCartBastideResahGuest.prototype = {
         return window.location.hash === '#/cart/validate' ? 990 : 1190; // Validate modal is narrower than main cart
     },
 
+    disabledSubmitButton: function(el) {
+        $(el).toggleClass("disabled")
+    }
+
 };
index 9214ed92159e00fd94e1559a3a28a0c4ea109eb6..ec308f44856e871ac87da5509091ca0fc3605e53 100644 (file)
@@ -417,7 +417,7 @@ input[type=email], input[type=password], input[type=text] {
   }
 
   #Bastide_auth_form {
-    padding: 0 58px 50px;
+    padding: 0 50px 50px;
 
     * {
       font-size: 12px;
@@ -466,6 +466,11 @@ input[type=email], input[type=password], input[type=text] {
       border: 1px solid #000000;
     }
 
+    button[type=submit].disabled {
+      opacity: 0.8;
+      pointer-events: none;
+    }
+
     input[type=checkbox] {
       width: 16px;
       height: 16px;
@@ -475,6 +480,7 @@ input[type=email], input[type=password], input[type=text] {
       margin: 0 10px 0 0;
       position: relative;
       flex-shrink: 0;
+      font-size: 13px;
 
       &:checked::before {
         content: url('../images/valid.svg');
@@ -545,7 +551,6 @@ input[type=email], input[type=password], input[type=text] {
     .cta {
       width: 100%;
       height: 40px;
-      max-width: 220px;
       text-transform: uppercase;
       text-align: center;
       font-size: 14px;
@@ -553,6 +558,9 @@ input[type=email], input[type=password], input[type=text] {
       margin: 0 auto;
       cursor: pointer;
       font-weight: 700;
+      &:not(#send_email_forgotpass) {
+        max-width: 220px;
+      }
     }
 
     #login, #create-account, #forgot-password {
@@ -627,6 +635,9 @@ input[type=email], input[type=password], input[type=text] {
       p:not(:last-child) {
         margin-bottom: 20px;
       }
+      a {
+        text-wrap: nowrap;
+      }
     }
   }