

@extends('layouts.agencies')
@section('title', 'Create Agency')
@section('content')
<?php Fun::lang()?>
<div class="main-content-wrapper">
	 <div class="main-content-wrapper">
		<div class="breadcrumb">
			<div class="container">
				<ul class="">
					<li><a href="{{route('dashboard-agencies.index')}}">Dashboard<span>/</span></a></li>
					<li><a href="#">Agency<span>/</span></a></li>
					<li><a href="">Register</a></li>

				</ul>
			</div>
		</div>
		
	</section>  
    
	<div class="main-box">
		<div class="main-content">
			<div class="main-admin-dashboard">
				<div class="container">
					<div class="page-wrapper">
						
						<div class="row">
							<div class="col-sm-12 col-xs-12">
								<div class="form-wrapper">
                                    @if (count($errors) > 0)
                                        <div class="alert-message alert-danger">
                                        <strong>Whoops!</strong> There were some problems with your input.<br><br>
                                        <ul>
                                            @foreach ($errors->all() as $error)
                                                <li>{{ $error }}</li>
                                            @endforeach
                                        </ul>
                                        </div>
                                    @endif
                                    <div class="page-wrapper">
                                        <div class="form-wrapper">        
                                        {!! Form::model($agencies, ['method' => 'PATCH','route' => ['admin-agency.update', $agencies->id],'enctype'=>'multipart/form-data']) !!}
                                            
                                                <div class="row">
                                                {!! Form::text('user_activity', null, array('placeholder' => 'First Name','class' => 'form-control','hidden')) !!}
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">First Name</label>
                                                            {!! Form::text('user_firstname', null, array('placeholder' => 'First Name','class' => 'form-control')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Last Name</label>
                                                            {!! Form::text('user_lastname', null, array('placeholder' => 'Last Name','class' => 'form-control')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Gender</label>
                                                            <select name="user_gender" id="" class="select2">
                                                                <option value="Male">Male</option>
                                                                <option value="Female">Female</option>
                                                            </select>
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Date OF Birth</label>
                                                            {!! Form::text('user_dob', null, array('placeholder' => 'Date Of Birth','class' => 'form-control date_picker')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">ID Card Number</label>
                                                            {!! Form::text('user_cardid', null, array('placeholder' => '#########','class' => 'form-control number-only')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Phone Number</label>
                                                            {!! Form::text('user_phone', null, array('placeholder' => 'Phone Number','class' => 'form-control number-only')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Reference</label>
                                                            {!! Form::text('user_reference', null, array('placeholder' => 'Reference','class' => 'form-control')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Email</label>
                                                             {!! Form::email('email', null, array('placeholder' => 'Email','class' => 'form-control')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Password</label>
                                                            {!! Form::password('password', array('placeholder' => 'Password','class' => 'form-control')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="form-group col-sm-6 col-xs-12">
                                                        <div class="col-3">
                                                            <label for="" class="required">Confirm Password</label>
                                                            {!! Form::password('confirm_password', array('placeholder' => 'Password','class' => 'form-control')) !!}
                                                            <span class="focus-border"></span>  
                                                        </div>
                                                    </div>
                                                    <div class="col-sm-12 col-xs-12">
                                                        <div class="sub-title">
                                                            <h3>Address</h3>
                                                        </div>
                                                    </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">
														<div class="box">
															<div class="m-card-profile">
																<div class="m-card-profile__pic">
																	<div class="m-card-profile__pic-wrapper">
																		<input type="hidden" name="hidden_image_name" value="{{ $agencies->avatar}}">
																		<img src='/assets/images/resize/{{$agencies->avatar}}'>
																	</div>
																	<div class="form-group m-form__group">
																		<div class="custom-file">
																			<input type="file" name="image" class="custom-file-input" id="customFile">

																		</div>
																	</div>
																</div>
															</div>
														</div>
													</div>
                                                   
                                                    <div class="col-sm-12 col-xs-12">
                                                        <div class="form-group">
                                                            <input type="submit" value="Save" class="button_primary pull-right">
                                                            
                                                        </div>
                                                    </div>
                                                </div>
                                                
                                            {!! Form::close() !!}
                                        </div>
                                    </div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
</div>
@endsection


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








