<?php $__env->startSection('main-content'); ?>
<main>
            <div class="container-fluid">
                <h2 class="mt-5 mb-4">Change Password</h2>
                <form id="ChangePassForm" action="<?php echo e(url('operator/PsswordChange')); ?>" method="post"> 
                    <?php echo csrf_field(); ?>
                <div class="row">
                         <div class="col-md-12">
                                  <div class="card card-primary">
                                    <div class="card-header">
                                      <h6 class="card-title">Change Password Form</h6>
                                      
                                    </div>
                                    <div class="card-body" id="demo">
                                      <div class="row">
                                           <div class="col-sm-6">
                                                <div class="form-group">
                                                  <label for="inputName">Old Password</label>
                                                  <input type="password" class="form-control" name="old_password" id="old_password" onkeypress="OldPass()">
                                                </div>
                                                <div id="error_old_password" style="color:red"></div>
                                           </div>
                                           <div class="col-sm-6"></div>
                                           <div class="col-sm-6">
                                                <div class="form-group">
                                                  <label for="inputName">New Password</label>
                                                  <input type="password" class="form-control" name="new_password" id="new_password" onkeypress="NewPass()">
                                                </div>
                                                <div id="error_new_password" style="color:red"></div>
                                           </div>
                                           <div class="col-sm-6"></div>
                                           <div class="col-sm-6">
                                                <div class="form-group">
                                                  <label for="inputName">Confirm Password</label>
                                                  <input type="password" class="form-control" name="confirm_password" id="confirm_password" onkeypress="ConPass()">
                                                </div>
                                                <div id="error_confirm_password" style="color:red"></div>
                                           </div>
                                           <div class="col-sm-6"></div>
                                           <div class="col-sm-6">
                                                <div class="form-group">
                                                    <label for="inputName">&nbsp;</label>
                                                    <div class="clear"></div>
                                                    <input type="button" value="Submit" class="btn btn-success float-right" onclick="Validation()">
                                                </div>

                                          </div>
                                      </div>
                                    </div>
                                    <!-- /.card-body -->
                                  </div>
                                  <!-- /.card -->
                                  
                                  <!-- end -->
                         </div>
                </div>
                </form>
            </div>
        </main>
                <?php $__env->stopSection(); ?>
<?php $__env->startSection('javascript'); ?>
<script type="text/javascript">
    function OldPass(){
        $("#error_old_password").empty();
    }

    function NewPass(){
        $("#error_new_password").empty();
    }

    function ConPass(){
        $("#error_confirm_password").empty();
    }
</script>
<script type="text/javascript">
    
    function Validation(){
        $("#error_old_password").empty();
        $("#error_new_password").empty();
        $("#error_confirm_password").empty();

        if($('#old_password').val()==false){
            $("#error_old_password").append("Please enter your old password");
            return false;
        }
        if($('#new_password').val()==false){
            $("#error_new_password").append("Please enter your new password");
            return false;
        }
        if($('#confirm_password').val()==false){
            $("#error_confirm_password").append("Please enter your confirm password");
            return false;
        }
        if($('#new_password').val() != $('#confirm_password').val()){
            $("#error_confirm_password").append("Confirm password does not match");
            return false;
        }

        $('#ChangePassForm').submit();
    }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('operator.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/aks5g/public_html/aadhar.aks.5g.in/resources/views/operator/change_password.blade.php ENDPATH**/ ?>