[edit] subscribe form client side validation

et#14
tribikram 2 years ago
parent cbe0928929
commit c5d44d9533
  1. 3
      app/Http/Controllers/HomeController.php
  2. 6
      public/frontend/css/style.css
  3. 5
      resources/views/about.blade.php
  4. 65
      resources/views/layout/app.blade.php
  5. 2
      resources/views/services.blade.php
  6. 6
      resources/views/welcome.blade.php

@ -39,7 +39,8 @@ class HomeController extends Controller
$subject = 'Subscription Notice';
$message->subject('Subscription Notice');
$message->to('admin@eteducation.com.au', 'Et-Visa')->subject($subject);
// $message->to('admin@eteducation.com.au', 'Et-Visa')->subject($subject);
$message->to('kctribikram7@gmail.com', 'Et-Visa')->subject($subject);
$message->cc('extratechweb@gmail.com', 'Extratech')->subject($subject);
$message->cc('suman@extratechs.com.au', 'Extratech')->subject($subject);

@ -1007,11 +1007,10 @@ Responsive Codes
margin: 10px 0;
}
.success-message{
padding: 1rem;
font-weight: 500;
font-size: 14px;
line-height: 2.6rem;
color: #4BB543;
color: #FFFFFF;
}
.form-sec .form-control::placeholder{
font-weight: 400;
@ -1616,7 +1615,8 @@ Responsive Codes
color: #FFFFFF;
}
.footer-link:hover{
color: #E22899;
color: #A9C5ED;
transition: all 200ms ease-in-out;
}
.fa-facebook:hover{
color: #4267B2;

@ -71,8 +71,9 @@
<div class="row gx-5">
<div class="col-md-6">
<div class="values-left">
<p>We are passionate about creating a calm, inspiring work environment that attracts very
high-performing talent. We connect that talent with our partners, providing mutual growth opportunities.
<p>
We work with you to turn your plan to study overseas into a launch pad for professional success and personal growth.
ET Education combines experience and technology to help you make the most informed decision possible.
</p>
<div class="values-img">
<img src="{{url('frontend/images/attractive-man.png')}}" class="img-fluid" id="values-img" alt="">

@ -211,10 +211,11 @@
<h1 class="mb-20 text-white link-title">Free Newsletter</h1>
<p>Subscribe for our free newsletter</p>
<div class="custom-search">
<input type="text" name = "email" id = "subscribe_email" class="custom-search-input" placeholder="Email address" required>
<button class="custom-search-botton" onclick="subscribe()">Subscribe</button>
<input type="text" name = "email" id = "subscribe_email" class="custom-search-input" placeholder="Email address" onkeyup="subscribeValidation()">
<button class="custom-search-botton" onclick="subscribe()" type="submit">Subscribe</button>
</div>
<span class="success-message" id= "success-message"></span>
<span class="success-message" id="success-message"></span>
<span class="success-message" id="error-message"></span>
</div>
<div class="col footer-socials">
<h1 class='text-white link-title'>Join Our Social Community</h1>
@ -285,35 +286,47 @@
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
function subscribe(){
var email = document.getElementById('subscribe_email');
if(email.value != null){
$.ajax({
var email = document.getElementById('subscribe_email');
var successMessage = document.getElementById('success-message');
var errorMessage = document.getElementById('error-message')
url: "/subscribe",
type:"POST",
data:{
email:email.value,
},
success:function(response){
if (response) {
// alert(response.success);
$('#success-message').text(response.success);
email.value = '';
// $("#contactForm")[0].reset();
}
function subscribeValidation(){
if(email.value.length == 0){
errorMessage.innerHTML="Please provide email address!";
return false;
}
else{
errorMessage.innerHTML="";
return true;
}
}
function subscribe(){
if(!subscribeValidation()){
return false;
}
else{
$.ajax({
url: "/subscribe",
type:"POST",
data:{
email:email.value,
},
success:function(response){
if (response) {
$('#success-message').fadeOut(5000).text(response.success);
email.value = '';
console.log(response)
// alert(response.success);
// $("#contactForm")[0].reset();
}
},
error: function(response) {
}
});
}
});
}
</script>
}
</script>
</html>

@ -90,7 +90,7 @@
</div>
<div class="service-page-content">
<h2>Business Visa</h2>
<p>If you want to study in a city surrounded by lush greenery and a pleasant atmosphere..</p>
<p>Acquire a Business Visa and take advantage of Australia's thriving market to expand and succeed with your business.</p>
</div>
</div>
</a>

@ -79,7 +79,7 @@
<div class="col-md-5">
<div class="services-content">
<h1>Explore and Choose the Service that Fits You the Best.</h1>
<p>ET Education aims to serve clients to live their aspirations through steering them in the right direction towards the desired yield. With all leading hands-on platforms, we offer you a wide range of services.</p>
<p>ET Education aims to serve clients to live their aspirations through steering them in the right direction towards the desired yield. With all leading hands-on platforms, we offer you a wide range of services.</p>
<a href="/services">Explore All Services</a>
</div>
</div>
@ -99,7 +99,7 @@
<img src="{{url('frontend/icons/migration-visa.png')}}" alt="">
</div>
<h2>Business Visa</h2>
<p>Explore and Choose the Course that Meets your Dream</p>
<p>Unleash your entrepreneurial spirit in Australia.</p>
<a href="visa/business-visa">Learn More</a>
</div>
</div>
@ -153,7 +153,7 @@
<div class="col-md-6">
<div class="why-us-desc">
<h1>Why Choose Us</h1>
<p>A remarkable number of Nepalese students from across the world, from diverse backgrounds, have achieved their international education goals successfully through us, the best Study Abroad Consultants in Nepal.</p>
<p>We specialise  in providing a wide range of services to students aspiring to study in Australia from counselling them in choosing the right institution and helping with their visa application to welcoming them in Australia and helping them settle with the Australian life.</p>
<div class="why-us-lists">
<div class="lists-icons">
<img src="{{url('frontend/icons/exclusive.svg')}}" class="img-fluid" alt="">

Loading…
Cancel
Save