<?php $__env->startSection('content_header'); ?>
    <h1>User</h1>
<?php $__env->stopSection(); ?>
<script src="//code.jquery.com/jquery.js"></script>
<?php $__env->startSection('content'); ?>
    <div class="row">
            <!--row starts-->

            <div class="col-md-12">
               
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <h3 class="panel-title">
                           Show User Data
                        </h3>
                </div>

                <div class="panel-body">
                        <form class="form-horizontal" action="<?php echo e(url('updateuserdata')); ?>" method="post" id="action" onsubmit="return validation();">

                            <!-- CSRF Token -->
                             <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">

                             <!--Office ID Hidden value-->
                              <input type="hidden" name="user_id" value="<?php echo e($user->id); ?>">
                             

                                <!-- Name input-->
                              
                                <div class="form-group">
                                    <label class="col-md-3 control-label" for="addr">Full Name</label>
                                    <div class="col-md-9">
                                        <input id="name" name="name" class="form-control" value="<?php echo e($user->name); ?>">
                                    </div>
                                </div>

                                    
                                 <div class="form-group">
                                    <label class="col-md-3 control-label" for="remarks">Email</label>
                                    <div class="col-md-9">
                                        <input id="email" name="email" class="form-control" value="<?php echo e($user->email); ?>">
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-md-3 control-label" for="name">Password</label>
                                    <div class="col-md-9">
                                        <input id="password" name="password" type="password" maxlength="100" placeholder="Enter the new password only if there is any change" class="form-control" value=""></div>
                                </div>
                                
                                <!-- Form actions -->
                                <div class="form-position">
                                    <div class="col-md-12 text-right">
                                         <a href="<?php echo e(url('user')); ?>"><button type="button" class="btn btn-responsive btn-danger btn-sm">Back</button></a>
                                        <button type="submit" id="btn" class="btn btn-responsive btn-warning btn-sm">Update</button>
                                    </div>
                                </div>
                        </form>
                    </div>
                </div>
               
            </div>
            <!--md-12 ends-->
        </div>

        <script>

function validation()
    {
        
        if(document.getElementById('email').value=="")
        {
            alert(" Please Enter the Email");
            document.getElementById('email').focus();
            return false;
        }

        if(document.getElementById('name').value=="")
        {
            alert(" Please Enter the Full Name");
            document.getElementById('name').focus();
            return false;
        }

       /* if(document.getElementById('password').value=="")
        {
            alert(" Please Enter the Password");
            document.getElementById('password').focus();
            return false;
        }*/

       
        document.getElementById("btn").disabled='true';

         
                    
        return true;
    }
</script>

			                    

  <?php $__env->stopSection(); ?>

<?php echo $__env->make('adminlte::page', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>