Raffales-LMS/resources/views/raffels/layouts/layout.blade.php
2024-04-16 15:43:24 +05:45

181 lines
7.8 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<!-- META -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="author" content="" />
<meta name="robots" content="" />
<meta name="description" content="" />
<!-- FAVICONS ICON -->
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" type="image/x-icon" href="{{asset('raffels/assets/images/fav-icon-18.png')}}" />
<!-- PAGE TITLE HERE -->
<title>Raffels</title>
<!-- MOBILE SPECIFIC -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/bootstrap.min.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/font-awesome.min.css') }}">
<!-- FONTAWESOME STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/feather.css') }}">
<!-- FEATHER ICON SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/owl.carousel.min.css') }}">
<!-- OWL CAROUSEL STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/magnific-popup.min.css') }}">
<!-- MAGNIFIC POPUP STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/lc_lightbox.css') }}">
<!-- Lc light box popup -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/bootstrap-select.min.css') }}">
<!-- BOOTSTRAP SLECT BOX STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/dataTables.bootstrap5.min.css') }}">
<!-- DATA table STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/select.bootstrap5.min.css') }}">
<!-- DASHBOARD select bootstrap STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/dropzone.css') }}">
<!-- DROPZONE STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/scrollbar.css') }}">
<!-- CUSTOM SCROLL BAR STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/datepicker.css') }}">
<!-- DATEPICKER STYLE SHEET -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/flaticon.css') }}"> <!-- Flaticon -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/swiper-bundle.min.css') }}">
<!-- Swiper Slider -->
<link rel="stylesheet" type="text/css" href="{{ asset('raffels/assets/css/style.css') }}"><!-- MAIN STYLE SHEET -->
</head>
<body>
@include('raffels.partials.header')
<div class="main-content">
@yield('content')
</div>
@include('raffels.partials.footer')
<!-- JAVASCRIPT FILES ========================================= -->
<script src="{{ asset('raffels/assets/js/jquery-3.6.0.min.js') }}"></script><!-- JQUERY.MIN JS -->
<script src="{{ asset('raffels/assets/js/popper.min.js') }}"></script><!-- POPPER.MIN JS -->
<script src="{{ asset('raffels/assets/js/bootstrap.min.js') }}"></script><!-- BOOTSTRAP.MIN JS -->
<script src="{{ asset('raffels/assets/js/magnific-popup.min.js') }}"></script><!-- MAGNIFIC-POPUP JS -->
<script src="{{ asset('raffels/assets/js/waypoints.min.js') }}"></script><!-- WAYPOINTS JS -->
<script src="{{ asset('raffels/assets/js/counterup.min.js') }}"></script><!-- COUNTERUP JS -->
<script src="{{ asset('raffels/assets/js/waypoints-sticky.min.js') }}"></script><!-- STICKY HEADER -->
<script src="{{ asset('raffels/assets/js/isotope.pkgd.min.js') }}"></script><!-- MASONRY -->
<script src="{{ asset('raffels/assets/js/imagesloaded.pkgd.min.js') }}"></script><!-- MASONRY -->
<script src="{{ asset('raffels/assets/js/owl.carousel.min.js') }}"></script><!-- OWL SLIDER -->
<script src="{{ asset('raffels/assets/js/theia-sticky-sidebar.js') }}"></script><!-- STICKY SIDEBAR -->
<script src="{{ asset('raffels/assets/js/lc_lightbox.lite.js') }}"></script><!-- IMAGE POPUP -->
<script src="{{ asset('raffels/assets/js/bootstrap-select.min.js') }}"></script><!-- Form js -->
<script src="{{ asset('raffels/assets/js/dropzone.js') }}"></script><!-- IMAGE UPLOAD -->
<script src="{{ asset('raffels/assets/js/jquery.scrollbar.js') }}"></script><!-- scroller -->
<script src="{{ asset('raffels/assets/js/bootstrap-datepicker.js') }}"></script><!-- scroller -->
<script src="{{ asset('raffels/assets/js/jquery.dataTables.min.js') }}"></script><!-- Datatable -->
<script src="{{ asset('raffels/assets/js/dataTables.bootstrap5.min.js') }}"></script><!-- Datatable -->
<script src="{{ asset('raffels/assets/js/chart.js') }}"></script><!-- Chart -->
<script src="{{ asset('raffels/assets/js/bootstrap-slider.min.js') }}"></script><!-- Price range slider -->
<script src="{{ asset('raffels/assets/js/swiper-bundle.min.js') }}"></script><!-- Swiper JS -->
<script src="{{ asset('raffels/assets/js/custom.js') }}"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
const targetId = this.getAttribute('href');
document.querySelector(targetId).scrollIntoView({
behavior: 'smooth'
});
});
});
</script>
<script>
$('#inquiries').on('submit', function(event) {
event.preventDefault();
var form = $(this)[0];
var url = $(this).attr('action');
//reset error message
$('#title_error').text('');
$('#email_error').text('');
$('#phone_error').text('');
var isValid = true;
var title = $('#title').val().trim(); // Change from .value() to .val()
if (title === '') {
$('#title_error').text('Name is Required');
isValid = false;
}
var email = $('#email').val().trim();
if (email === '') {
$('#email_error').text("Email is required");
isValid = false;
} else if (!isValidEmail(email)) {
$('#email_error').text('Invalid Email Format');
isValid = false;
}
var phone = $('#phone').val().trim(); // Change from .value() to .val()
if (phone !== '' && !isValidPhone(phone)) {
$('#phone_error').text("Invalid phone number");
isValid = false;
}
function isValidEmail(email) {
var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(email);
}
// Phone validation function
function isValidPhone(phone) {
var phoneRegex = /^\+?[0-9]{8,}$/;
return phoneRegex.test(phone);
}
if (isValid) {
var formData = new FormData(form);
$.ajax({
url: url,
method: 'POST',
data: formData,
processData: false,
contentType: false,
dataType: 'JSON',
success: function(response) {
if (response.status == true) {
form.reset();
Swal.fire({
position: "top-end",
icon: "success",
title: "Your form has been submitted",
showConfirmationButton: false,
timer: 1500
});
}
},
error: function(response) {
$('#title_error').text(response.responseJSON.errors.title);
$('#email_error').text(response.responseJSON.errors.email);
$('#phone_error').text(response.responseJSON.errors.phone);
}
})
}
});
</script>
</body>
</html>