@extends('layouts.layout-2')

@section('content')
    <div class="card mb-4">
        <h6 class="card-header">
            {{__('Change Password')}}
        </h6>
        <div class="card-body">
            {!! Form::open(['url' => route('user_update_password')]) !!}
            <div class="form-group row">
                <label class="col-form-label col-sm-2 text-sm-right">{{__('Old Password')}}*</label>
                <div class="col-sm-10">
                    <input class="form-control {{ $errors->has('old_password') ? 'is-invalid' : '' }}" type="password" name="old_password" placeholder="{{__('Old Password')}}*" required>
                    @if ($errors->has('old_password'))
                        <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('old_password') }}</strong>
                            </span>
                    @endif
                </div>
            </div>
            <div class="form-group row">
                <label class="col-form-label col-sm-2 text-sm-right">{{__('New Password')}}*</label>
                <div class="col-sm-10">
                    <input class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}" type="password" name="password" placeholder="{{__('New Password')}}*" required>
                    @if ($errors->has('password'))
                        <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('password') }}</strong>
                            </span>
                    @endif
                </div>
            </div>
            <div class="form-group row">
                <label class="col-form-label col-sm-2 text-sm-right">{{__('Confirm new Password')}}*</label>
                <div class="col-sm-10">
                    <input class="form-control" {{ $errors->has('password_confirmation') ? 'is-invalid' : '' }} type="password" name="password_confirmation" placeholder="{{__('Confirm new Password')}}*" required>
                    @if ($errors->has('password_confirmation'))
                        <span class="invalid-feedback" role="alert">
                                <strong>{{ $errors->first('password_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