@extends('layouts.layout-2')

@section('content')
    <div class="card mb-4">
        <h6 class="card-header">
            {{__('Change E-Mail')}}
        </h6>
        <div class="card-body">
            <div class="row">
                <div class="col-sm-2"></div>
                <div class="col-sm-10">
                    <p>{{__('Change your e-mail address here. We will send you a new activation link to your new e-mail address to verify it.')}}</p>
                </div>
            </div>

            {!! Form::open(['url' => route('user_update_email')]) !!}

            <div class="form-group row">
                <label class="col-form-label col-sm-2 text-sm-right">{{__('New E-Mail Address')}}*</label>
                <div class="col-sm-10">
                    <input class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" type="email" name="email" placeholder="{{__('New E-Mail Address')}}*" required>
                    @if ($errors->has('email'))
                        <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('email') }}</strong>
                            </span>
                    @endif
                </div>
            </div>
            <div class="form-group row">
                <label class="col-form-label col-sm-2 text-sm-right">{{__('Confirm new E-Mail')}}*</label>
                <div class="col-sm-10">
                    <input class="form-control" {{ $errors->has('email_confirmation') ? 'is-invalid' : '' }} type="email" name="email_confirmation" placeholder="{{__('Confirm new E-Mail')}}*" required>
                    @if ($errors->has('email_confirmation'))
                        <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('email_confirmation') }}</strong>
                            </span>
                    @endif
                </div>
            </div>

            <div class="form-group row">
                <div class="col-sm-10 ml-sm-auto">
                    <button type="submit" class="btn btn-primary">{{__('save')}}</button>
                    <a href="{{ route('home') }}" class="btn btn-default">{{ __('back') }}</a>

                </div>
            </div>
            {!! Form::close() !!}
        </div>
    </div>
@endsection

