
@extends('app')

@section('page_title')
    Password Expiration
@endsection

@push('styles')
    <link rel="stylesheet" href="{{asset('assets/examples/css/pages/profile.min3f0d.css?v2.2.0')}}">
    <link rel="stylesheet" type="text/css" href="{{asset('css/DateTimePicker.min.css')}}" />
    <link rel="stylesheet" type="text/css" href="{{asset('css/DateTimePicker-ltie9.min.css')}}" />
    <script type="text/javascript" src="{{asset('js/DateTimePicker-ltie9.min.js')}}"></script>


    <link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.css"/>
    <link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid-theme.min.css"/>
    <link rel="stylesheet" href="{{asset('assets/examples/css/pages/profile.min3f0d.css?v2.2.0')}}">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
    <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
    <style>
        label {
            color: black;
            font-weight: normal;
            font-size: medium;
            font-family: 'Lato', sans-serif;
        }

        .lato {
            font-family: 'Lato', sans-serif;
        }
    </style>
    <style>
        .field-icon {
            float: right;
            margin-right: 10px;
            margin-top: -30px;
            position: relative;
            z-index: 2;
        }
    </style>

    <link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Roboto:300,400,500,300italic'>
    <script src="{{asset('js/modernizr.min.js')}}"></script>
@endpush

@section('page_content')
    <div class="page-content container" style="margin-top: 5em">
        <div class="row">

            @include('includes.side_profile')

            <div class="col-md-9">
                <div class="panel">
                    <div class="panel-body nav-tabs-animate nav-tabs-horizontal">
                        <form method="post" enctype="multipart/form-data" class="registration lato">
                            @if(session('success'))
                                <div class="alert alert-success">
                                    <ul>
                                        <li>{{ session('success') }}</li>
                                    </ul>
                                </div>
                            @endif

                            @csrf
                            <div class="row">
                                <div class="col-md-12 text-center">

                                    @if($error)
                                        <div class="alert alert-danger">
                                            <li><em>{{ $error }}</em></li>
                                        </div>
                                        <hr>
                                    @endif

                                </div>
                            </div>


                            <div class="row">
                                <div class="form-group col-md-6 {{ $errors->has('password') ? 'has-error' : '' }}">
                                    <label for="inputEmail4"> Current Password <em class="text-danger">*</em></label>
                                    <input type="password" id="password-field_1" class="form-control" value="{{old('current_password')}}" name="current_password" placeholder="" required>
                                    <span id="eye" class="field-icon" style="float: right"><i id="see_1" class="fa fa-eye"></i></span>
                                    @if ($errors->has('current_password'))
                                        <strong class="text-danger">{{ $errors->first('current_password') }} </strong>
                                    @endif
                                </div>

                            </div>
                            <div class="row">


                                <div class="form-group col-md-6 {{ $errors->has('password') ? 'has-error' : '' }}">
                                    <label for="inputEmail4"> New Password <em class="text-danger">*</em></label>
                                    <input type="password" id="password-field" class="form-control" value="{{old('password')}}" name="password" placeholder="" required>
                                    <span id="eye" class="field-icon" style="float: right"><i id="see" class="fa fa-eye"></i></span>
                                    @if ($errors->has('password'))
                                        <strong class="text-danger">{{ $errors->first('password') }} </strong>
                                    @endif
                                </div>

                                <div class="form-group col-md-6 {{ $errors->has('password_confirmation') ? 'has-error' : '' }}">
                                    <label for="inputEmail4"> Confirm Password <em class="text-danger">*</em></label>
                                    <input type="password" id="password-field2" class="form-control" value="{{old('password_confirmation')}}" name="password_confirmation" placeholder="" required>
                                    <span id="eye" class="field-icon" style="float: right"><i id="see2" class="fa fa-eye"></i></span>
                                    @if ($errors->has('password_confirmation'))
                                        <strong class="text-danger">{{ $errors->first('password_confirmation') }} </strong>
                                    @endif
                                </div>
                            </div>

                            <hr>
                            <div class="form-row text-center">
                                <div class="col-md-12">
                                    <button type="submit" class="btn then-submit" style="background-color: #4285F4; color: white"><i class="fa fa-shield"></i> Update</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection



@push('scripts')
    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsgrid/1.5.3/jsgrid.min.js"></script>
    {{--    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>--}}
    <script>
        $(document).ready(function () {
            $('#password-field_1').attr('type','password');
            $('#password-field').attr('type','password');
            $('#password-field2').attr('type','password');

            $('#see_1').attr('class','fa fa-eye');
            $('#see').attr('class','fa fa-eye');
            $('#see1').attr('class','fa fa-eye');

            $('#see_1').on('click',function () {
                $('#see_1').attr('class','fa fa-eye-slash');
                $('#password-field_1').attr('type','text');
            });


            $('#see').on('click',function () {
                $('#see').attr('class','fa fa-eye-slash');
                $('#password-field').attr('type','text');
            });

            $('#see2').on('click',function () {
                $('#see2').attr('class','fa fa-eye-slash');
                $('#password-field2').attr('type','text');
            });
        });
    </script>
@endpush
