]> _ Git - bastide-resah.git/commitdiff
wait #6893
authorsoufiane <soufiane@cubedesigners.com>
Mon, 6 May 2024 12:57:11 +0000 (14:57 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 6 May 2024 12:57:11 +0000 (14:57 +0200)
app/Notifications/ResahNotification.php
resources/webflow/css/custom.css
resources/webflow/js/custom.js

index 033bdf0c6b352d50757bf751d985c8563f9e6e6f..85980156f1f8bb889610d60bfc3066f44ce326d4 100644 (file)
@@ -48,7 +48,7 @@ class ResahNotification extends Notification
         $salutation = 'Cordialement,<br><br>Bastide Médical<br>resah@bastide-medical.fr';
         $subjectPrefix = '';
         if ($notifiable instanceof User) {
-            $greetings = '';
+            $greetings = ' '; // Without space, default value is set
             $salutation = 'Message envoyé automatiquement depuis le site Bastide-resah.fr';
             $subjectPrefix = '[Bastide-resah.fr] ';
         }
@@ -56,7 +56,7 @@ class ResahNotification extends Notification
         if ($this->type === self::ACCOUNT_CREATED) {
             $url = backpack_url('/client/' . $this->data->id . '/edit');
             $subject = 'Nouveau compte en attente de validation';
-            $html = 'Un nouveau compte client a été créé.<br>Pour le valider, rendez-vous sur <a href="' . $url . '">' . $url . '</a>';
+            $html = 'Un nouveau compte client a été créé.<br>Pour le valider, cliquez sur le lien suivant <a href="' . $url . '">' . $url . '</a>';
         } else if ($this->type === self::ACCOUNT_VALIDATED) {
             $subject = 'Votre compte Bastide-resah.fr a été validé';
             $url = url('/');
index fe7769f12519a6e2c2b623c3b52c54875c341b65..f463570258b0e6c597676b0f3955613eec2cec59 100644 (file)
@@ -117,7 +117,6 @@ a.back {
 .cta {
     width: 100%;
     height: 40px;
-    max-width: 220px;
     text-transform: uppercase;
     text-align: center;
     font-size: 14px !important;
@@ -127,6 +126,10 @@ a.back {
     font-weight: 700;
 }
 
+.cta:not(#send_email_forgotpass) {
+    max-width: 220px;
+}
+
 #register, .form-header, #send_email_forgotpass {
     background-color: rgba(59, 74, 153);
     color: #ffffff;
@@ -153,8 +156,13 @@ input {
     border: 1px solid #000000;
 }
 
+button[type=submit].disabled {
+    opacity: 0.8;
+    pointer-events: none;
+}
+
 #Bastide_auth_form {
-    padding: 0 58px 50px;
+    padding: 0 50px 50px;
 }
 
 #Bastide_register_form {
@@ -233,3 +241,6 @@ input {
     text-transform: initial;
     font-size: 14px;
 }
+#Bastide_notif_form a {
+    text-wrap: nowrap;
+}
index 15ab7fdb6608f4f0874c5b4015b7aa188c586388..ce7eeafe4899cfb25fae9968b1e7b68d641d2d66 100644 (file)
@@ -20,7 +20,7 @@ Cart.prototype = {
             let formData = $(this).serialize()
             var $this = this
             $.ajax({
-                url: '/fluidbook/login',
+                url: '/landing/login',
                 type: 'POST',
                 data: formData,
                 success: function(data) {
@@ -52,6 +52,10 @@ Cart.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)
+        })
 
         /**
          *
@@ -73,7 +77,7 @@ Cart.prototype = {
             $this.closeView()
         })
 
-        $(document).mouseup(function(e)
+        /*$(document).mouseup(function(e)
         {
             var container = $("#Bastide_cart");
 
@@ -82,7 +86,7 @@ Cart.prototype = {
             {
                 $this.closeView()
             }
-        });
+        });*/
     },
 
     getCaption: function(title) {
@@ -122,6 +126,7 @@ Cart.prototype = {
         switch (action) {
             case 'register':
                 form += `<form id="Bastide_register_form" class="" data-content="register" action="/fluidbook/signin">
+                    <input type="hidden" value="${$('[name=\'csrf-token\']').attr('content')}" name="_token" />
                     <div class="form-group">
                         <div class="form-header">
                             établissement hospitalier
@@ -192,6 +197,7 @@ Cart.prototype = {
                 break;
             case 'forgot_pass':
                 form += `<form id="Bastide_forgotpass_form" data-content="forgotpass">
+                    <input type="hidden" value="${$('[name=\'csrf-token\']').attr('content')}" name="_token" />
                     <div class="form-controls">
                         <label for="">Adresse email</label>
                         <input type="email" name="email" />
@@ -252,6 +258,9 @@ Cart.prototype = {
             error: function(xhr, status, error) {
                 let errorsMessage = JSON.parse(xhr.responseText);
                 $this.displayErrors(errorsMessage)
+            },
+            complete: function() {
+                $this.disabledSubmitButton($("button[type=submit]"))
             }
         });
     },
@@ -259,7 +268,7 @@ Cart.prototype = {
     forgotpass: function(d) {
         let $this = this
         $.ajax({
-            url: '/fluidbook/forgotpassword',
+            url: '/landing/forgotpassword',
             type: 'POST',
             data: d,
             success: function(data) {
@@ -267,9 +276,11 @@ Cart.prototype = {
                 $this.updateDataContent()
             },
             error: function(xhr, status, error) {
-
                 let errorsMessage = JSON.parse(xhr.responseText);
                 $this.displayErrors(errorsMessage)
+            },
+            complete: function() {
+                $this.disabledSubmitButton($("button[type=submit]"))
             }
         })
     },
@@ -286,6 +297,9 @@ Cart.prototype = {
             error: function(xhr, status, error) {
                 let errorsMessage = JSON.parse(xhr.responseText);
                 $this.displayErrors(errorsMessage)
+            },
+            complete: function() {
+                $this.disabledSubmitButton($("button[type=submit]"))
             }
         })
     },
@@ -301,6 +315,10 @@ Cart.prototype = {
             }
         }
     },
+
+    disabledSubmitButton: function(el) {
+        $(el).toggleClass("disabled")
+    }
 }
 
 $(function () {