Ver código fonte

add modal alert on enquiry

master
azri 1 mês atrás
pai
commit
2b7bcc7144
1 arquivos alterados com 18 adições e 1 exclusões
  1. 18
    1
      resources/views/home.antlers.html

+ 18
- 1
resources/views/home.antlers.html Ver arquivo

@@ -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.');

Carregando…
Cancelar
Salvar