MINI Sh3ll
@extends('auth.master')
@section('title', 'Login')
@section('content')
<!-- begin:: Page -->
<!-- Start login -->
<div class="m-login__signin">
<div class="m-login__head">
<h3 class="m-login__title">
</h3>
</div>
<form id="otp-form" class="m-login__form m-form" action="{{url('/enter-otp')}}" method="POST"
id="validateOtp" data-parsley-validate="">
@csrf
@if (isset($error))
<div class="alert-msg alert alert-danger" role="alert">
{{ $error }}
</div>
@endif
@if (isset($valid))
<h5 class="m-login__title">
One time Password(OTP) has been sent to your mobile number *******{{substr($phone, -3)}}, please enter the same here to login.
</h5>
@endif
<div class="form-group m-form__group">
@if (!isset($phone))
<?php $phone = ''; ?>
@endif
<input type="hidden" name="phone" value="{{$phone}}">
<label for="otp">
Enter OTP
</label>
<input class="form-control m-input" id="otp" type="text" placeholder="OTP" name="otp" autocomplete="off"
required
data-parsley-required-message = 'OTP is required'
data-parsley-type = 'digits'
data-parsley-type-message = 'OTP should be in digits'
data-parsley-minlength = '5'
data-parsley-maxlength = '5'
data-parsley-trigger = 'change focusout'>
</div>
<div class="row m-login__form-sub">
<div class="col m--align-left">
<a href="{{url('/login')}}" id="m_login_forget_password" class="m-link">
Back to Login
</a>
</div>
<div class="col m--align-right">
<a href="javascript:void(0);" id="m_login_resend_otp" class="m-link">
Resend
</a>
{{-- <button id="m_login_phone_submit" class="btn btn-focus m-btn m-btn--pill m-btn--custom m-btn--air">
Submit
</button> --}}
</div>
</div>
<div class="m-login__form-action">
<button id="m_login_phone_submit" class="btn btn-focus m-btn m-btn--pill m-btn--custom m-btn--air">
Submit
</button>
{{-- <button type="button" onclick="window.location.href='/login'" id="m_login_signup_cancel" class="btn btn-outline-focus m-btn m-btn--pill m-btn--custom">
Back
</button> --}}
</div>
</form>
</div>
<!-- End OTP Form -->
<script>
$("#m_login_resend_otp").click(function() {
//console.log('resend clicked');
$('#otp').prop('required',false);
$('#otp-form').attr("action", "/login-with-otp");
$('#otp-form').attr("method", "post");
$('#otp-form').submit();
});
</script>
@endsection
OHA YOOOO