]]jkjjgdjffksdkdxdsghfghdfghfgdfsdsdfsdfsfdsbcxvxcbccwewqeqwewqskfgj
במ12[cxvbcxvbxcvbcxvcxvbcvxcvbsdfsdfsdfsdfsdfsdfxcvbxcvxbbxqwqewqewv;'
/
home
/
u506006416
/
domains
/
viznara.com
/
resources
/
views
/
auth
/
Upload FileeE
HOME
<div class="card maiogin"> <div class="bg-light text-dark card-header text-center">Verify Phone Number</div> <div class="card-body"> <span class="text-success success_message"></span> <div class="d-flex flex-column align-items-start"> <label class="text-capitalize form-label">Phone number</label> <input required="" type="number" class="form-control" value="{{$phone}}" name="phone"> <span class="text-danger error_phone"> @if ($errors->has('phone')) {{ $errors->first('phone') }} @endif </span> </div> <div class="d-flex flex-column align-items-start"> <label for="email" class="w-100 text-start form-label">OTP Number</label> <div class="input-group"> <span class="input-group-text bg-light text-dark"> <i class="fa fa-phone"></i> </span> <input type="number" placeholder="OTP Number" name="otpnumber" id="otpnumber" class="form-control" aria-describedby="Phone Number" value=""> </div> <span class="text-danger error_otp"> @if ($errors->has('otpnumber')) {{ $errors->first('otpnumber') }} @endif </span> </div> <div> <p style="font-size: 0.8rem; text-align: start;"> By Continuing, you agree to our <a href="{{route('termAndCondition')}}">Legal Terms</a> and you are 18 years or older. </p> </div> <button type="button" id="submit_otp" class="text-capitalize btn btn-primary">submit</button> </div> </div> <script src="{{asset('js')}}/jquery-3.3.1.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#submit_otp").on("click", function(e){ $("input[name='phone']").removeClass('border-danger'); $("#otpnumber").removeClass('border-danger'); $(".error_phone").html(''); $(".error_otp").html(''); var otp = $("input[name='otpnumber']").val(); var phone = $("input[name='phone']").val(); if(phone.length ==10){ if(otp.length == 5){ $("#otpnumber").html("please wait...").attr("disabled",true); $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, url : "{{ route('verifyOtp') }}", data : {'otpNumber':otp,'phone':phone}, type : 'POST', dataType : 'json', success : function(result){ $("#otpnumber").html("submit").attr("disabled",false); if(result.type == 'error'){ if(result.for == 'phone'){ $("input[name='phone']").addClass('border-danger'); $(".error_phone").html(result.message); }else{ $("#otpnumber").addClass('border-danger'); $(".error_otp").html(result.message); } }else{ window.location.href=result.message; } } }); }else{ $("#otpnumber").addClass('border-danger'); $(".error_otp").html('Invalid OTP'); } }else{ $("input[name='phone']").addClass('border-danger'); $(".error_phone").html('Phone number must be equal to 10 digits'); } }); }); </script>