Parcourir la source

add modal alert on enquiry

master
azri il y a 1 mois
Parent
révision
2b7bcc7144
1 fichiers modifiés avec 18 ajouts et 1 suppressions
  1. 18
    1
      resources/views/home.antlers.html

+ 18
- 1
resources/views/home.antlers.html Voir le fichier

@@ -177,6 +177,21 @@
177 177
     </div>
178 178
 </div>
179 179
 
180
+<!-- Button trigger modal -->
181
+<button id="triggerModal" type="button" style="max-height: 1px; max-width: 1px;position: absolute; top: -100px; left: -100px;" data-bs-toggle="modal" data-bs-target="#enquiryModal"> </button>
182
+
183
+  <!-- Modal -->
184
+  <div class="modal fade" id="enquiryModal" tabindex="-1">
185
+    <div class="modal-dialog modal-dialog-centered">
186
+      <div class="modal-content">
187
+        <div class="modal-body text-center">
188
+            <p>Your Enquiry has been submitted, we will contact you soon</p>
189
+            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
190
+        </div>
191
+      </div>
192
+    </div>
193
+  </div>
194
+
180 195
 <!-- FOOTER -->
181 196
 <div class="container-fluid p-0 m-0">
182 197
     <div class="row m-0 p-0 d-flex" style="background-color: #396868">
@@ -234,8 +249,10 @@
234 249
 
235 250
         // Handle the response
236 251
         if (response.ok) {
252
+
237 253
           console.log('Enquiry submitted successfully:', result);
238
-          alert('Your enquiry has been submitted!');
254
+          document.getElementById("triggerModal").click()
255
+
239 256
         } else {
240 257
           console.error('Submission failed:', result);
241 258
           alert('Submission failed. Please try again.');

Chargement…
Annuler
Enregistrer