changes
This commit is contained in:
28
resources/views/thankyou.blade.php
Normal file
28
resources/views/thankyou.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('theme.spade.layouts.main')
|
||||
@section('meta')
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="https://aroginhealthcare.com/thankyou" >
|
||||
@endsection
|
||||
@section('content')
|
||||
|
||||
<div class="ending">
|
||||
<section >
|
||||
<div class="last-picture">
|
||||
<img src="./images/bye.jpg" alt="byee">
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="last-text">
|
||||
<h3>Thanks for Visiting Us!</h3>
|
||||
<p>Your form has been submitted. We will get back to you shortly </p>
|
||||
<a href="https://aroginhealthcare.com/">Back to the homepage <i class="fas fa-home"></i></a>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@endsection
|
@@ -267,7 +267,7 @@
|
||||
<div class="flex justify-content-center">
|
||||
<div class="w-70; mx-auto">
|
||||
<p>Have any questions? Leave us your contact information, and we’ll reach out to you.</p>
|
||||
<form action="{{ route('contactUsMessage') }}" method="post">
|
||||
<form id="contactForm" action="{{ route('contactUsMessage') }}" method="post">
|
||||
@csrf
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6 mb-10">
|
||||
@@ -296,8 +296,7 @@
|
||||
</div>
|
||||
<div class="col-md-6 mb-10">
|
||||
<label for="phone-number" class="form-label">Contact Number</label>
|
||||
<input type="text" class="form-control" id="phone-number" name="phone"
|
||||
placeholder="98XXXXXXXX">
|
||||
<input type="tel" class="form-control phone-number" id="phone-number" name="phone" placeholder="98XXXXXXXX">
|
||||
@error('phone')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
@@ -326,3 +325,50 @@
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#contactForm").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var form = $(this);
|
||||
var url = form.attr("action");
|
||||
|
||||
// Remove any existing errors
|
||||
form.find(".text-danger").remove();
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
data: form.serialize(),
|
||||
success: function (response) {
|
||||
// Clear the form
|
||||
form[0].reset();
|
||||
|
||||
// Redirect to thank you page
|
||||
window.location.href = "/thankyou";
|
||||
},
|
||||
error: function (xhr) {
|
||||
if (xhr.status === 422) {
|
||||
var errors = xhr.responseJSON.errors;
|
||||
|
||||
$.each(errors, function (key, value) {
|
||||
var field = $("[name='" + key + "']");
|
||||
var wrapper = field.closest(".mb-10"); // Bootstrap column wrapper
|
||||
|
||||
// Remove old errors
|
||||
wrapper.find(".text-danger").remove();
|
||||
|
||||
// Append new error under the field
|
||||
wrapper.append('<div class="text-danger mt-1">' + value[0] + '</div>');
|
||||
});
|
||||
} else {
|
||||
alert("Something went wrong, please try again later.");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
@@ -24,11 +24,15 @@
|
||||
<link href="{{ asset('source/css/font-awesome.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('source/css/flaticon.css') }}" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/intl-tel-input@17.0.19/build/css/intlTelInput.min.css"/>
|
||||
|
||||
|
||||
<link href="https://arogin.thikeniraj.com.np/source/css/style.min.css" rel="stylesheet">
|
||||
<link href="https://arogin.thikeniraj.com.np/source/css/custom.css" rel="stylesheet">
|
||||
|
||||
<link href="{{ asset('source/css/custom.css') }}" rel="stylesheet">
|
||||
|
||||
|
||||
<!-- Responsive -->
|
||||
<link href="{{ asset('source/css/responsive.css') }}" rel="stylesheet">
|
||||
|
||||
@@ -54,6 +58,9 @@
|
||||
|
||||
@include('theme.spade.layouts.includes.footer')
|
||||
|
||||
<a class="whatsapp-icon" href="https://wa.me/{{ $generalSetting['mobile_number'] }}" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/commons/6/6b/WhatsApp.svg" alt="WhatsApp" />
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!--End pagewrapper-->
|
||||
@@ -69,6 +76,29 @@
|
||||
<script src="{{ asset('source/js/googlemaps.min.js') }}"></script>
|
||||
<script src="{{ asset('source/js/script.min.js') }}"></script>
|
||||
<script src="https://maps.google.com/maps/api/js?sensor=true"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/js/intlTelInput.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.19/js/utils.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".phone-number").each(function() {
|
||||
var input = this;
|
||||
var iti = window.intlTelInput(this, {
|
||||
initialCountry: "auto",
|
||||
geoIpLookup: function(success, failure) {
|
||||
$.get("https://ipinfo.io", function() {}, "jsonp").always(function(resp) {
|
||||
var countryCode = (resp && resp.country) ? resp.country : "us";
|
||||
success(countryCode);
|
||||
});
|
||||
},
|
||||
separateDialCode: true
|
||||
});
|
||||
$(this).closest("form").on("submit", function(e) {
|
||||
$(input).val(iti.getNumber());
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stack('js')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@@ -69,8 +69,8 @@
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<input class="form-control" type="text" name="contact_no" placeholder="Phone *"
|
||||
<div class="col-md-12 appointment-form-field">
|
||||
<input class="form-control phone-number" type="text" name="contact_no" placeholder="Phone *"
|
||||
required>
|
||||
@error('contact_no')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@@ -167,3 +167,45 @@
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("form[action='{{ route('consultat_with_us') }}']").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var form = $(this);
|
||||
var url = form.attr("action");
|
||||
|
||||
// Remove existing error messages
|
||||
form.find(".text-danger").remove();
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
data: form.serialize(),
|
||||
success: function (response) {
|
||||
form[0].reset();
|
||||
window.location.href = "/thankyou"; // redirect after success
|
||||
},
|
||||
error: function (xhr) {
|
||||
if (xhr.status === 422) {
|
||||
var errors = xhr.responseJSON.errors;
|
||||
|
||||
$.each(errors, function (key, value) {
|
||||
var field = form.find("[name='" + key + "']");
|
||||
var wrapper = field.closest(".col-md-12"); // keep errors inside column wrapper
|
||||
|
||||
// Append the error message below the field
|
||||
wrapper.append('<div class="text-danger mt-1">' + value[0] + '</div>');
|
||||
});
|
||||
} else {
|
||||
alert("Something went wrong, please try again later.");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
|
@@ -81,7 +81,7 @@
|
||||
<div class="col-md-7 col-sm-6 col-xs-12 contact-form wow fadeInLeft" data-wow-delay="0ms"
|
||||
data-wow-duration="1000ms">
|
||||
<h2>Write in details</h2>
|
||||
<form action="{{ route('contactUsMessage') }}" method="post">
|
||||
<form id="contactForm" action="{{ route('contactUsMessage') }}" method="post">
|
||||
@csrf
|
||||
<div class="field-container clearfix">
|
||||
<div class="form-group col-md-6 col-sm-12 col-xs-12">
|
||||
@@ -97,8 +97,8 @@
|
||||
@enderror
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="form-group col-md-4 col-sm-12 col-xs-12">
|
||||
<input type="text" name="phone" placeholder="Contact No*" required="required">
|
||||
<div class="form-group col-md-4 col-sm-12 col-xs-12 contact-us-form">
|
||||
<input type="text" class="phone-number" name="phone" placeholder="Contact No*" required="required">
|
||||
@error('phone')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
@@ -136,3 +136,40 @@
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
@push('js')
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#contactForm").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var form = $(this);
|
||||
var url = form.attr("action");
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
data: form.serialize(),
|
||||
success: function (response) {
|
||||
form[0].reset();
|
||||
window.location.href = "/thankyou";
|
||||
},
|
||||
error: function (xhr) {
|
||||
// handle validation errors
|
||||
if (xhr.status === 422) {
|
||||
var errors = xhr.responseJSON.errors;
|
||||
$(".text-danger").remove();
|
||||
$.each(errors, function (key, value) {
|
||||
$("[name='" + key + "']").after('<div class="text-danger">' + value[0] + "</div>");
|
||||
});
|
||||
} else {
|
||||
alert("Something went wrong, please try again later.");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
@@ -66,8 +66,8 @@
|
||||
</div>
|
||||
|
||||
<div class="clearfix"></div>
|
||||
<div class="form-group col-md-4 col-sm-12 col-xs-12">
|
||||
<input type="text" name="contact_no" placeholder="Contact No*" required="required">
|
||||
<div class="form-group col-md-4 col-sm-12 col-xs-12 contact-us-form">
|
||||
<input type="tel" class="phone-number" name="contact_no" placeholder="Contact No*" required="required">
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-8 col-sm-12 col-xs-12">
|
||||
@@ -95,3 +95,46 @@
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("form[action='{{ route('make-appointment') }}']").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var form = $(this);
|
||||
var url = form.attr("action");
|
||||
|
||||
// Remove previous error messages
|
||||
form.find(".text-danger").remove();
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
data: form.serialize(),
|
||||
success: function (response) {
|
||||
// Reset form
|
||||
form[0].reset();
|
||||
// Redirect to thank you page
|
||||
window.location.href = "/thankyou";
|
||||
},
|
||||
error: function (xhr) {
|
||||
if (xhr.status === 422) {
|
||||
var errors = xhr.responseJSON.errors;
|
||||
|
||||
$.each(errors, function (key, value) {
|
||||
var field = form.find("[name='" + key + "']");
|
||||
var wrapper = field.closest(".form-group"); // keep error inside the form group
|
||||
wrapper.append('<div class="text-danger mt-1">' + value[0] + '</div>');
|
||||
});
|
||||
} else {
|
||||
// alert("Something went wrong, please try again later.");
|
||||
toast.error("Something went wrong, please try again later.");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
@@ -166,9 +166,8 @@
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<input class="form-control" type="text" name="contact_no" placeholder="Phone *"
|
||||
required>
|
||||
<div class="col-md-12 appointment-form-field">
|
||||
<input class="form-control phone-number" type="text" name="contact_no" placeholder="Phone *" required>
|
||||
@error('contact_no')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
@@ -233,3 +232,45 @@
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("form[action='{{ route('consultat_with_us') }}']").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var form = $(this);
|
||||
var url = form.attr("action");
|
||||
|
||||
// Remove existing error messages
|
||||
form.find(".text-danger").remove();
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "POST",
|
||||
data: form.serialize(),
|
||||
success: function (response) {
|
||||
form[0].reset();
|
||||
window.location.href = "/thankyou"; // redirect after success
|
||||
},
|
||||
error: function (xhr) {
|
||||
if (xhr.status === 422) {
|
||||
var errors = xhr.responseJSON.errors;
|
||||
|
||||
$.each(errors, function (key, value) {
|
||||
var field = form.find("[name='" + key + "']");
|
||||
var wrapper = field.closest(".col-md-12"); // keep errors inside column wrapper
|
||||
|
||||
// Append the error message below the field
|
||||
wrapper.append('<div class="text-danger mt-1">' + value[0] + '</div>');
|
||||
});
|
||||
} else {
|
||||
alert("Something went wrong, please try again later.");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
Reference in New Issue
Block a user