@extends('Dashboard.auth_master_page')




@section('meta_title')
    {{ 'Password Reset - Aryanict.com' }}
@endsection


@section('title')
    <span>Enter your new password</span>
@endsection


@section('description')
    <p>
        
    </p>
@endsection



@section('content')

<div class="row g-0 justify-content-center">
    <div class="col-sm-8 col-xl-6">

        @if(Session::has('success_message'))
        <div style="color:green;font-size: .875rem;margin-top: .375rem;width:100%">{{ Session::get('success_message') }}</div>
        @endif

        @if(Session::has('error_message'))
         <div style="color:#dc2626;font-size: .875rem;margin-top: .375rem;width:100%">{{ Session::get('error_message') }}</div>
        @endif
        <br>
      <form class="js-validation-reminder" action="{{ route('password.store') }}"  method="POST" id="email_form">
        @csrf

        <input type="hidden" name="token" value="{{ $request->route('token') }}"> 
        <input type="hidden" name="email" value="{{ old('email', $request->email) }}">
        
       
        <div class="mb-4">
          <input type="password" class="form-control form-control-lg form-control-alt py-3 @error('password') is-invalid @enderror" value="{{ old('password') }}" name="password" placeholder="Password">
         

          @error('password')
          <div  class="invalid-feedback animated fadeIn">{{ $message }}</div>
          @enderror
        </div>

        <div class="mb-4">
            <input type="password" class="form-control form-control-lg form-control-alt py-3 @error('confirm') is-invalid @enderror" value="{{ old('password_confirmation') }}"  name="password_confirmation" placeholder="Re-type your password">
           
  
            @error('password_confirmation')
            <div  class="invalid-feedback animated fadeIn">{{ $message }}</div>
            @enderror

            @if ($errors->any())
              @foreach ($errors->all() as $error)
              <div  class="invalid-feedback animated fadeIn">{{ $error }}</div>
              @endforeach
            @endif
          </div>

       
        <br>
        <div class="text-center">
           
          <button type="submit" class="btn btn-lg btn-alt-primary">
            Change
          </button>
          
        </div>
      </form>
    </div>
  </div>




@endsection

@section('script')
<script>
    $(function() {
        $('#email_form').submit(function(event) {
            var verified = grecaptcha.getResponse();
            if (verified.length === 0) {
                event.preventDefault();
            }
        });
    });
</script>

@endsection


