From: soufiane Date: Fri, 3 May 2024 09:08:01 +0000 (+0200) Subject: wait #6888 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ff33aaf4970fc8a5bb39a9a01af34792314ebb1e;p=fluidbook-html5.git wait #6888 --- 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 4cb2bbdf..e6cb5368 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js @@ -29,12 +29,22 @@ FluidbookCartBastideResahGuest.prototype = { $(document).on("submit", '#Bastide_login_form', function (e) { e.preventDefault() - let action = $(this).attr('action') let formData = $(this).serialize() - //$this.submitForm(); $this.login(formData) }); + $(document).on("submit", "#Bastide_forgotpass_form", function(e) { + e.preventDefault() + let formData = $(this).serialize() + $this.forgotpass(formData) + }) + + $(document).on("submit", "#Bastide_resetpass_form", function(e) { + e.preventDefault() + let formData = $(this).serialize() + $this.resetpass(formData) + }) + /*$(document).on("submit", 'form', function (e) { e.preventDefault() let action = $(this).attr('action') @@ -99,7 +109,7 @@ FluidbookCartBastideResahGuest.prototype = { form += `
- établissement hospitaliers + établissement hospitalier
@@ -178,6 +188,19 @@ FluidbookCartBastideResahGuest.prototype = { form += `

Vous allez recevoir un email avec un lien vous permettant de redéfinir votre mot de passe.

` break; + case 'forgot_pass': + form += ` +
+ + +
+ + ` + break; + case 'forgot_pass_notif': + form += `

Vous allez recevoir un email avec un lien vous permettant de redéfinir votre mot de passe.

+
` + break; default: form += `

Pour afficher les tarifs, ajouter des produits à votre sélection, et nous envoyer une demande de devis, veuillez vous identifier :

@@ -249,6 +272,24 @@ FluidbookCartBastideResahGuest.prototype = { }); }, + forgotpass: function(d) { + let $this = this + $.ajax({ + url: '/fluidbook/forgotpassword', + type: 'POST', + data: d, + success: function(data) { + $this.updateCart('forgot_pass_notif') + $this.updateDataContent() + }, + error: function(xhr, status, error) { + + let errorsMessage = JSON.parse(xhr.responseText); + $this.displayErrors(errorsMessage) + } + }) + }, + displayErrors: function(errors) { $(".errors-container").remove() $(".error").removeClass("error") diff --git a/style/cart/bastide-resah.less b/style/cart/bastide-resah.less index e3cb8f92..9214ed92 100644 --- a/style/cart/bastide-resah.less +++ b/style/cart/bastide-resah.less @@ -44,7 +44,6 @@ input[type=email], input[type=password], input[type=text] { color: #000; height: 100%; width: 100%; - min-height: 25vh; min-width: 320px; max-width: 336px; margin: 0 auto; @@ -424,6 +423,11 @@ input[type=email], input[type=password], input[type=text] { font-size: 12px; } + *:not(label) { + font-size: 14px; + } + + *:not(#forgot-password):not(.underbar):not(.cta) { text-align: left; } @@ -611,7 +615,7 @@ input[type=email], input[type=password], input[type=text] { left: 25px; } - label { + label, a { text-transform: initial; font-size: 14px; }