<div class="row">
		<div class="col-12 text-center mb-2">
			<a href="https://www.benthamscience.com/journal-impacting-science?utm_source=SLANewsletter&utm_medium=ad&utm_campaign=SLA2024&utm_id=SLA2024&utm_term=slanewsletter&utm_content=link"><img src="/images/trial_request_form_banner.jpg" class="img-fluid"></a>
		</div>
		<div class="col-12"><h2 class="h2">Trial Requests Form</h2></div>
<div class="col-12">

@if ($errors->any())<div class="alert alert-danger"><ul>@foreach ($errors->all() as $error)<li>{{ $error }}</li>@endforeach</ul></div>@endif
@if ($message = Session::get('success'))<div class="alert alert-success alert-dismissable"><p>{!! $message !!}</p></div>@endif

<div class="card">
<div class="card-body">       
      
<form name="first" method="post" action="{{ route('trial_requests') }}" enctype="multipart/form-data">
<input type="hidden" name="_token" value="<?=csrf_token()?>">

	<div class="row">
          <div class="form-group col-md-12 mb-0">
              <label class="control-label" for="select21">Journal: *</label>
              <select class="form-control select2" id="journal_id" name="journal_id" required>
                  <option selected="true" value="" disabled="disabled" hidden>Select Journal:</option>
                  @foreach($journal_search as $key => $value)
                          <option value="{{ $key }}" {{ old('journal_id', $journal_id) == $key ? 'selected' : '' }}>{{ $value }}</option>
                  @endforeach 
              </select>
          </div>
    </div>    
	
    <div class="row">
	
		<div class="col-md-6">
			<h5 class="border-bottom pb-2 mt-5 mb-4">Contact Information</h5>
			<div class="form-row">
				<div class="form-group col-md-12">
					<label>First Name:</label>            
					<input type="text" name="first_name" class="form-control" required = 'required' value="{{ old('first_name') }}" />
				</div>
				<div class="form-group col-md-12">
					<label>Last Name: *</label>
					<input type="text" name="last_name" class="form-control" required = 'required' value="{{ old('last_name') }}" />
				</div>
				<div class="form-group col-md-12">
					<label>E-mail: *</label>
					<input type="email" name="email" class="form-control" required = 'required' value="{{ old('email') }}" />
				</div>
			</div>
		</div>
      
		<div class="col-md-6">
			<h5 class="border-bottom pb-2 mt-5 mb-4">Institution Contact Details</h5>
			<div class="form-row">
				<div class="form-group col-md-12">
					<label>Institution Name: *</label>
					<input type="text" name="institution_name" class="form-control" required = 'required' value="{{ old('institution_name') }}" />
				</div>
				<div class="form-group col-md-12">
					<label>Institution Country: *</label>
					<select class="form-control" id="institution_country" name="institution_country" required = 'required'>
						<option value="">Country</option>
					@foreach ($country as $countries)
						<option value="{{$countries->printable_name}}" {{ (Request::old("institution_country") == $countries->printable_name ? "selected":"") }}> {{$countries->printable_name}}</option>
					@endforeach
					</select>
				</div> 
				<div class="form-group col-md-12">
					<label>Comments: *</label>            
					<textarea name="comments" rows="2" class="form-control" required="required">{{ old('comments') }}</textarea>
				</div>				
			</div>
		</div>

		<div class="col-md-12">
			<div class="d-flex justify-content-center">
				<div class="row col-md-3">
					<div class="col-auto mx-auto w-100 d-flex ">
						<div class="captcha m-1"><span>{!! captcha_img() !!}</span></div>
						<button type="button" class="btn btn-danger m-1" class="refresh-captcha" id="refresh-captcha">&#x21bb;</button>
					</div>	
					<div class="col-auto mx-auto w-100 d-flex ">	
						<input id="captcha" type="text" class="form-control" placeholder="Enter Captcha" name="captcha">
					</div>	
					<div class="col-auto mx-auto w-100 d-flex ">		
						@if ($errors->has('captcha'))
						<span class="invalid-feedback" style="display: block;"><strong>{{ $errors->first('captcha') }}</strong></span>
						@endif
					</div>
				</div>          
			</div>
			<div class="form-group text-center border-top mt-3 pt-3"><input class="btn btn-dark col-md-2" type="submit" name="submit" /></div>
		</div>
	</div>
	
</form>
</div>
</div>  
</div>
</div>