Procházet zdrojové kódy

clear code for success message

am
farhan před 4 měsíci
rodič
revize
246ffea426

+ 0
- 1
resources/views/digital-card.blade.php Zobrazit soubor

@@ -144,7 +144,6 @@
144 144
                 });
145 145
             });
146 146
         </script>
147
-        <div id="alert-success"></div>
148 147
         <div class="parent absolute h-screen w-full">
149 148
             {{-- <audio src="{{asset('assets/paper-ripping.mp3')}}"></audio> --}}
150 149
             @include('components.front-cover')

+ 2
- 21
resources/views/modals/guestbook-modal.blade.php Zobrazit soubor

@@ -42,7 +42,7 @@
42 42
             data: formData,
43 43
             success: function(response) {
44 44
               $('#closeSpeechForm').submit();
45
-              var alertContainer = $('.alert-success');
45
+              var alertContainer = $('.alert-info');
46 46
               alertContainer.find('span').text(response.message); // Set message text
47 47
               alertContainer.fadeIn().removeClass('hidden'); // Show the alert
48 48
               setTimeout(function() {
@@ -54,25 +54,6 @@
54 54
             }
55 55
           });
56 56
         });
57
-      })
58
-
59
-      function showSuccessMessage(message) {
60
-          // Create a dynamic success message element
61
-          var successAlert = $('<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert">' +
62
-              '<span class="block sm:inline">' + message + '</span>' +
63
-              '</div>');
64
-
65
-          // Append the message to a suitable container in your HTML (e.g., modal, form, or body)
66
-          $('#alert-success').append(successAlert);
67
-
68
-          // Automatically remove the message after 3 seconds
69
-          setTimeout(function() {
70
-              successAlert.fadeOut('slow', function() {
71
-                  $(this).remove();
72
-              });
73
-          }, 3000); // 3 seconds
74
-
75
-          // session()->forget('success');
76
-      }
57
+      });
77 58
     </script>
78 59
 @endpush

+ 1
- 18
resources/views/modals/rsvp-modal.blade.php Zobrazit soubor

@@ -48,7 +48,7 @@
48 48
           data: formData,
49 49
           success: function(response) {
50 50
             $('#closeRsvpForm').submit();
51
-            var alertContainer = $('.alert-success');
51
+            var alertContainer = $('.alert-info');
52 52
             alertContainer.find('span').text(response.message); // Set message text
53 53
             alertContainer.fadeIn().removeClass('hidden'); // Show the alert
54 54
             setTimeout(function() {
@@ -61,22 +61,5 @@
61 61
         });
62 62
       });
63 63
     });
64
-
65
-    function showSuccessMessage(message) {
66
-        // Create a dynamic success message element
67
-        var successAlert = $('<div class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative" role="alert">' +
68
-            '<span class="block sm:inline">' + message + '</span>' +
69
-            '</div>');
70
-
71
-        // Append the message to a suitable container in your HTML (e.g., modal, form, or body)
72
-        $('#alert-success').append(successAlert);
73
-
74
-        // Automatically remove the message after 3 seconds
75
-        setTimeout(function() {
76
-            successAlert.fadeOut('slow', function() {
77
-                $(this).remove();
78
-            });
79
-        }, 3000); // 3 seconds
80
-    }
81 64
   </script>
82 65
 @endpush

+ 1
- 1
resources/views/rsvp-digital-card.blade.php Zobrazit soubor

@@ -81,7 +81,7 @@
81 81
               data: formData,
82 82
               success: function(response) {
83 83
                 $('#RSVPForm')[0].reset();
84
-                var alertContainer = $('.alert-success');
84
+                var alertContainer = $('.alert-info');
85 85
                 alertContainer.find('span').text(response.message); // Set message text
86 86
                 alertContainer.fadeIn().removeClass('hidden'); // Show the alert
87 87
                 setTimeout(function() {

Načítá se…
Zrušit
Uložit