From a8a703bf8a5be711a0d67a11ba6d5bd53eb525e5 Mon Sep 17 00:00:00 2001 From: soufiane Date: Mon, 6 May 2024 14:57:31 +0200 Subject: [PATCH] wait #6888 --- .../cart/fluidbook.cart.bastide-resah-guest.js | 16 +++++++++++++++- style/cart/bastide-resah.less | 15 +++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js b/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js index e6cb5368..233c0b92 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js @@ -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") + } + }; diff --git a/style/cart/bastide-resah.less b/style/cart/bastide-resah.less index 9214ed92..ec308f44 100644 --- a/style/cart/bastide-resah.less +++ b/style/cart/bastide-resah.less @@ -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; + } } } -- 2.39.5