From 03f34735aeb6cbe231d7175c42493e71a74b21bd Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 24 Apr 2024 16:10:26 +0200 Subject: [PATCH] wip #6882 @2:00 --- .../fluidbook.cart.bastide-resah-guest.js | 39 +++++++++++++++---- style/cart/bastide-resah.less | 4 +- 2 files changed, 34 insertions(+), 9 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 328c4207..a352c5dc 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.bastide-resah-guest.js @@ -13,9 +13,11 @@ FluidbookCartBastideResahGuest.prototype = { return false; }); - $(document).on(this.fluidbook.input.clickEvent, '#create-account', function () { - $this.updateTitle('Créer un compte') - $this.updateCart('register') + $(document).on(this.fluidbook.input.clickEvent, '[data-action]', function () { + let title = $(this).data('title') + let action = $(this).data('action') + $this.updateTitle(title) + $this.updateCart(action) $this.updateDataContent() }); @@ -27,9 +29,19 @@ 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", 'form', function (e) { + e.preventDefault() + let action = $(this).attr('action') + let formData = $(this).serialize() + //$this.submitForm(); + $this.login(formData) + });*/ }, addToCart: function (reference) { @@ -84,7 +96,7 @@ FluidbookCartBastideResahGuest.prototype = { let form = `
`; switch (action) { case 'register': - form += `
+ form += `
établissement hospitalier @@ -153,8 +165,21 @@ FluidbookCartBastideResahGuest.prototype = { resah@bastide-medical.fr

` 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 += `
+ form += `

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

@@ -167,12 +192,12 @@ FluidbookCartBastideResahGuest.prototype = {
- Mot de passe oublié ? + Mot de passe oublié ?

ou

Pas encore inscrit ?

- +
`; } form += `
`; diff --git a/style/cart/bastide-resah.less b/style/cart/bastide-resah.less index 894c448a..105d4c27 100644 --- a/style/cart/bastide-resah.less +++ b/style/cart/bastide-resah.less @@ -36,7 +36,7 @@ color: #000; height: 100%; width: 100%; - min-height: 35vh; + min-height: 25vh; min-width: 320px; max-width: 336px; margin: 0 auto; @@ -481,7 +481,7 @@ } } - #login, #register { + #login, #register, #send_email_forgotpass { background-color: @menu-background; border-color: @menu-background; color: #fff; -- 2.39.5