
@extends('layouts.agencies')
 
@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="">Agency list</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">
								@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="form-wrapper">  
										
									<div class="tabbable">
										<ul class="nav nav-pills nav-stacked col-md-3">

											<li class="active"><a href="#profile_pic" data-toggle="tab"> <span class="glyphicon glyphicon-menu-right"></span> Personal Info</a></li>
											<li><a href="#bank_info" data-toggle="tab"><span class="glyphicon glyphicon-menu-right"></span> Bank Info</a></li>
											<li><a href="#security" data-toggle="tab"> <span class="glyphicon glyphicon-menu-right"></span> Security</a></li>

										</ul>

										<div class="tab-content col-md-9">

											<div class="tab-pane active" id="profile_pic">
												<div class="bgc-midnightblue padding5 fontc-white">
														{!! Form::model($user, ['method' => 'POST','route' => ['change.profile_images', $user->id],'enctype'=>'multipart/form-data']) !!}
														 {!! Form::hidden('user_activity', null, array('placeholder' => 'First Name','class' => 'form-control','hidden')) !!}
														
														<input type="hidden" name="user_id" hidden="" value="{{auth::user()->id}}">
														
														<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="form-control select2">
																	<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')) !!}
																
														</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">Email</label>
																 {!! Form::email('email', null, array('placeholder' => 'Email','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','required')) !!}

		                                                </div>
														<div class="col-sm-12">

															<div class="col-xs-12 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="{{ Auth::user()->avatar}}">
																				<img src='/assets/images/resize/{{Auth::user()->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>
														<div class="col-sm-12 col-xs-12">
															<div class="form-group">
																<input type="submit" value="Save" class="button_primary pull-right">
															</div>
														</div>
													</form>
												</div>
												
											</div>
											<div class="tab-pane" id="bank_info">
												<div class="bgc-midnightblue padding5 fontc-white">
													<form action="{{route('agency-bank.store')}}" method="POST" id="form_login">
														@csrf
														<input type="hidden" name="id" value="{{$id}}" hidden="">
														<input type="hidden" name="agency_id" value="{{Auth::user()->id}}" hidden="">
														 <div class="col-md-12 col-sm-12 col-xs-12">
															
																<label class="required">Bank </label>
																{!! Form::select('bank_id', $bank, null, ['class' => 'form-control select2','id'=>'bank']) !!}
																
														</div>
														<div class="form-group col-sm-12 col-xs-12">
															
																<label class="required">Account Name</label>
																
																<input type="text" name="account_name" value="{{$account_name}}" class="form-control">
																
														</div>
														<div class="form-group col-sm-12 col-xs-12">
															
																<label class="required">Account Number</label>
																<input type="text" name="account_number" value="{{$account_number}}" class="form-control text-uppercase">
																
														</div>
														<div class="form-group col-sm-12 col-xs-12">
															
															<p><label for="">Thank you for entering this account as your Bank Information </label></p>
															<p><label for="">Bank Name : {{$bank_name}}</label></p>
															<p><label for="" class="text-uppercase">Account Name : {{$account_name}}</label></p>
															<p><label for="">Account Number : {{$account_number}}</label></p>
														</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>
													</form>
												</div>
												
											</div>
											<div class="tab-pane" id="security">
												<div class="bgc-midnightblue padding5 fontc-white">
													<form action="{{route('change.change_password')}}" method="POST" id="form_login">
														@csrf

														<div class="form-group col-sm-12 col-xs-12">
															
																<label class="required">Password</label>
																{!! Form::password('password', array('placeholder' => 'Old Passowrd','class' => 'form-control','autocomplete'=>'of')) !!}
																
														</div>
														<div class="form-group col-sm-12 col-xs-12">
															
																<label class="required">New Password </label>
																{!! Form::password('new_password', array('placeholder' => 'New Password','class' => 'form-control','autocomplete'=>'of')) !!}
																
														</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>
													</form>
												</div>
												
											</div>

										 </div>
									</div>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
	</div>
</div>

@endsection


<style>
.chosen-container { width: 100% !important; }
</style>
@section('script')
    <script type="text/javascript" src="{{asset('assets/controller/location.js')}}"></script>
@endsection



