@extends('admin.admin-master') 
@section('content')
<div>&nbsp; </div>
<div>&nbsp; </div>
<h3><i class="fa fa-lock"></i> Password Change  </h3>
<div>&nbsp; </div>
<div class="col-md-12">
    <div class="col-md-6">
        @if (Session::has('message'))
        <span class="alert {{Session::get('class')}}">
            {{Session::get('message')}}
        </span>
        @endif
        <!-- Form Name -->
        {{Form::open(array('url'=>'/admin/reset-pass','method'=>'POST','id'=>'reset_pass'))}}
        <!-- Text input-->
        <div class="clearfix">&nbsp;</div>
        <div class="control-group">
            <label class="control-label" for="textinput"> Old password :  </label>
            <div class="controls">
                {{Form::password('old_password',array('class'=>'form-control input-sm' ,'placeholder'=>'Old password' ,'required'=>''))}}
            </div>
        </div>
        <div class="clearfix">&nbsp;</div>
        <div class="clearfix">&nbsp;</div>
        <div class="control-group">
            <label class="control-label" for="textinput"> New password :  </label>
            <div class="controls">
                {{Form::password('new_password',array('class'=>'form-control input-sm' ,'placeholder'=>'New password' ,'required'=>'' , 'onkeyup'=>'checkPassDobule()'))}}
            </div>
        </div>
        <div class="clearfix">&nbsp;</div>
        <div class="control-group">
            <label class="control-label" for="textinput"> Again new password :  </label>
            <div class="controls">
                {{Form::password('again_new_password',array('class'=>'form-control input-sm' ,'placeholder'=>'Again new password' ,'required'=>'' , 'onkeyup'=>'checkPassDobule()'))}}
            </div>
        </div>
        <div class="clearfix"> <span id="status"> &nbsp; </span> </div>
        <div class="clearfix">&nbsp;</div>
        <div class="control-group">
            <div class="controls">
                {{Form::button('Reset password',array('type'=>'submit','class'=>'btn btn-warning btn-sm'))}}
            </div>
        </div>
        <script>
            // Password check
            function checkPassDobule()
            {
                var new_password = $('input[name="new_password"]').val();
                var again_new_password = $('input[name="again_new_password"]').val();
                if (new_password == 1)
                {
                    $('#status').html('<i class="fa fa-times"></i> Empty!');
                }
                else if (again_new_password == 1)
                {
                    $('#status').html('<i class="fa fa-times"></i> Empty!');
                }
                else if (new_password == again_new_password)
                {
                    $('#status').html('<i class="fa fa-check"></i> Ok!');
                } else
                {
                    $('#status').html('<i class="fa fa-times"></i> Not match ');
                }

            }
        </script>
        {{Form::close()}}
        <!--// End Form Name -->
    </div>
    <div class="col-md-6"></div>
</div>
<!---- Modal ------>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Update group</h4>
            </div>
            <div class="modal-body group-form">
            </div>
            <p class="">&nbsp;</p>
        </div>
    </div>
</div>
<!---// Modal ------->
@stop
