OwlCyberSecurity - MANAGER
Edit File: country.blade.php
@extends('layouts.master') @section('title') Select Your Country @endsection @section('tag') <meta name="description" content=""> @endsection @section('levelCSS') @endsection @section('vi;') active @endsection @section('body') @include('partials.breadcrumb', ['title'=>'Select Your Country']) <section> <div class="container" style="background: #fff; padding: 40px 15px; margin-bottom: 20px; margin-top: 20px;"> <div class="row justify-content-center"> <div class="col-sm-4 text-justify py-5 section-head"> <div class="clear"></div> <p>Kindly select your country below to customize your payment options. (You will only do this once).</p> <hr> <form action="{{route('/country')}}" id="countryForm" method="post"> <div class="form-group"> <select name="country" class="form-control crs-country" data-region-id="one" data-default-value="{{currentUser()->country}}" required id=""></select> </div> {{ csrf_field() }} <div class="form-group"> <button class="btn btn-md btn-success btn-block" id="countryBtn">PROCEED <i class="fa fa-arrow-circle-o-right"></i></button> </div> </form> <br><br> </div> </div> </div> </section> @endsection @section('levelJS') <script> $(document).ready(function () { $('#countryForm').submit(function (e) { e.preventDefault(); $('#countryBtn').prop('disabled', true).html("SETTING COUNTRY <i class='fa fa-spinner fa-spin'></i>"); var url = $(this).attr('action'); var method = $(this).attr('method'); var formData = $(this).serialize(); $.ajax({ type: method, url: url, data: formData, dataType: "JSON", success: function (data) { if (data.status == 1) { $('#countryBtn').prop('disabled', false).html("PROCEED <i class='fa fa-arrow-circle-right'></i>"); swal(data.post, '', 'warning'); } else { window.location.href="{{$url}}"; } }, failure: function (e) { swal('OOPS! SOMETHING IS BROKEN', 'Reloading Page', 'danger'); location.reload(); } }) }); }); </script> @endsection