
<form id="frm_create_aff" action="{{ route('affiliation.store') }}" method="POST">

@csrf

<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
	<h4 class="modal-title">Add Author's Affiliations</h4>
</div>
<div class="modal-body">

<div class="row">
<div class="col-md-12">
 
	<input type="hidden" id="author_id" name="author_id" value="{{$author_id}}" />

	<div id="div_aff_country" class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">Country: </label>
		<select class="form-control" id="country" name="country" onchange="GetState()">
		<option value="" hidden>Select Country</option>
			@foreach ($countries as $country)
			<option value="{{$country->country}}" > {{$country->country}}</option>
			@endforeach
		</select>
	</div>
	
	<div  class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">State:</label>
		<select class="form-control" id="state" name="state" onchange="GetCity()">
		<option value="" hidden>Select State</option>
		@if(isset($states))
			@foreach ($states as $state)
			<option value="{{$state->state}}"> {{$state->state}}</option>
			@endforeach
		@endif
		</select>
	</div>
	
	<div  class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">City:</label>
		<select class="form-control" id="city" name="city" onchange="GetInstitute()">
		<option value="" hidden>Select City</option>
		@if(isset($states))
			@foreach ($cities as $city)
			<option value="{{$city->city}}" > {{$city->city}}</option>
			@endforeach
		@endif	
		</select>
	</div>
	
	<div class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">Institution:</label>
		<select class="form-control" id="institution" name="institution">
		<option value="" hidden>Select Institution</option>
		@if(isset($institutions))
			@foreach ($institutions as $institution)
			<option value="{{$institution->institution_id}}" > {{$institution->name}}</option>
			@endforeach
		@endif	
		</select>
	</div>
	
	<div  class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">Department:</label>
		<input type="text" id="department" name="department" class="form-control input-md" placeholder="Department">
	</div>

	<div  class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">Address:*</label>
		<input type="text" id="address" name="address" class="form-control input-md" placeholder="address">
	</div>

	<div  class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">Postal Code:</label>
		<input type="text" id="postal_code" name="postal_code" class="form-control input-md" placeholder="Postal Code" >
	</div>

	<div  class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">Phone:</label>
		<input type="text" id="phone" name="phone" class="form-control input-md" placeholder="Phone" >
	</div>

	<div  class="form-group col-lg-4 col-md-4 col-sm-4">
		<label class="control-label">Fax:</label>
		<input type="text" id="fax" name="fax" class="form-control input-md" placeholder="Fax" >
	</div>

	<div  class="form-group col-lg-12 col-md-12 col-sm-12">
		<label class="control-label">Web View:*</label>
		<textarea id="web_view" name="web_view" class="form-control input-md" placeholder="Web View" ></textarea> 
	</div>
	
</div>
</div>
</div>

<div class="modal-footer">
	<button class="btn btn-default btn-xs " type="button" onclick="show({{$author_id}})">Back</button>
	<button class="btn btn-success btn-xs " type="button" onclick="store();">Save</button>
	<button type="button" data-dismiss="modal" class="btn btn-default pull-left">Close</button>
</div>

</form>