
@extends('adminlte::page')
 
@section('content')
<?php Fun::lang()?>
<div class="title-page">
	<div class="page-bar">
	    <ul class="page-breadcrumb">
	      	<li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
	      	<li><a href="#">Enployee</a></li>
	      	<li><a href="#">Edit User</a></li>
	    </ul>
	</div>
</div>
<div class="page">
    <div class="top-content">
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                <div class="title-add">
                    <div class="pull-left">
                        <h3>Edit User</h3>
                    </div>
                </div>
            </div>
        </div>
    </div>

	{!! Form::model($user, ['method' => 'PATCH','route' => ['take-leave.update', $user->id],'enctype'=>'multipart/form-data']) !!}
				   <div class="row">
					   
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">First Name</label>
							   {!! Form::text('user_firstname', null, array('placeholder' => 'First Name','class' => 'form-control')) !!}
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Last Name</label>
							   {!! Form::text('user_lastname', null, array('placeholder' => 'Last Name','class' => 'form-control')) !!}
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Gender</label>
							   <select name="user_gender" id="" class="select2 form-control">
								   <option value="Male">Male</option>
								   <option value="Female">Female</option>
							   </select>
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Date OF Birth</label>
							   {!! Form::text('user_dob', null, array('placeholder' => 'Date Of Birth','class' => 'form-control date_picker')) !!}
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">ID Card Number</label>
							   {!! Form::text('user_cardid', null, array('placeholder' => '#########','class' => 'form-control')) !!}
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Phone Number</label>
							   {!! Form::text('user_phone', null, array('placeholder' => 'Phone Number','class' => 'form-control number-only')) !!}
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Reference</label>
							   {!! Form::text('user_reference', null, array('placeholder' => 'Reference','class' => 'form-control')) !!}
							   
					   </div>
					   
					   
					  
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Position </label>
							   {!! Form::select('position_id', $positions, null, ['class' => 'form-control select2']) !!}
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Roles </label>
							   {!! Form::select('roles[]', $roles,[], array('class' => 'form-control select2')) !!}
							   
					   </div>
					   
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Email</label>
							   {!! Form::email('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
							   
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Password</label>
							   {!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
							   
					   </div>
					   <div class="form-group col-sm-6 col-xs-12">
						  
							   <label class="required">Confirm Password</label>
							   {!! Form::password('confirm_password', array('placeholder' => 'Password','class' => 'form-control')) !!}
							   
					   </div>
					   <div class="form-group col-sm-12 col-xs-12">

			                <label class="required">Address</label>
			                {!! Form::textarea('address', null, array('placeholder' => 'Address','class' => 'form-control','rows'=>'2')) !!}

			            </div>

		
				        <div class="col-xs-4 col-sm-4 col-md-4 pull-right">
                            <input type="hidden" name="hidden_image_name" value='{{ $user->avatar}}'>
                             <img src='/assets/images/resize/{{$user->avatar}}' width="100px" class="hide_img">
                            <div class="imageupload panel panel-default">
                                <div class="file-tab panel-body">
                                    <label class="btn button_warning btn-file">
                                        <span>Browse</span>
                                        <input type="file" name="image">
                                        
                                    </label>
                                    <button type="button" class="btn button_danger">Remove</button>
                                </div>  
                            </div>
                        </div>
					    <div class="col-sm-12 col-xs-12">
						   <div class="form-group">
							   <button type="submit" class=" button_primary pull-right"><span class="fa fa-save"></span> Save</button>
                    			<button type="button"  onClick="history.go(-1)" class="button_warning  pull-right">
                            	<span class=" fa fa-arrow-circle-left"></span> Back</button>
						   </div>
					   </div>
				   </div>
				   
			   {!! Form::close() !!}
	</div>
@endsection


@section('js')
    <script type="text/javascript" src="{{asset('assets/controller/location.js')}}"></script>
@endsection
