@extends('Dashboard.auth_master_page')




@section('meta_title')
    {{ 'Change Email - Aryanict.com' }}
@endsection


@section('title')
    <span>Change Email</span>
@endsection


@section('description')
    <p>
        Addn new email to receive the OTP
    </p>
@endsection



@section('content')

<div class="row g-0 justify-content-center">
    <div class="col-sm-8 col-xl-4">
      <form  action="{{ route('store.changed.email.verification') }}"  method="POST" >
        @csrf
        <div class="mb-4">
          <input type="email" class="form-control form-control-lg form-control-alt py-3 @error('email') is-invalid @enderror" value="{{ old('email') }}" name="email" placeholder="Enter your new email address" required>
          @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

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

        <div class="text-center">
            <a  href="/Servlet/VerifyEmail.py" style="margin-right: 10px"> Back to Email</a>

          <button type="submit" class="btn btn-lg btn-alt-primary">
            <i class="fa fa-fw fa-envelope me-1 opacity-50"></i> 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


