
@extends('layouts.app')
@section('title')
Journal - {{$journal->title}}
@parent
@stop
@section('content')
<!----Main Section Starts (where all content bodies exist)----> 
<main>

  <section>
    <div class="container">
      <div class="row">
	  
        <div class="col-md-12">
          <h2 class="h4">Full Text Inquiry</h2>
          <hr>

			<div class="card card-body mb-3 bigbox-hvr-slow">
				<h5 class="m-0">ePub [ahead of print] Inquiry Form:</h5>
				<hr>
				<p>Thank you for your interest in the full text of this ePub article. The full text of this article is not available as yet. Could you please complete and submit the brief EPub full text inquiry form given below and one of our representatives will contact you shortly with details of the article, it's availability, and price on order.</p>
			</div>	  

		</div>  
		<div class="col-lg-6 mb-4">
          	 <div class="card bigbox-hvr-slow">
				  <div class="card-body">

	   
   <h5>Article Detail:</h5>
	 <hr class="mb-0">
			<div class="form-group row border-bottom pb-2 mx-0">
				<label class="control-label col-lg-3 align-top"><strong>Title:</strong></label>
				<label class="control-label col-lg-9 font-weight-normal">{{$article->title}}</label>
			</div>
			<div class="form-group row border-bottom pb-2 mx-0">
				<label class="control-label col-lg-3"><strong>Abstract:</strong></label>
				<div class="col-lg-9">
				<button href="#" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#abstract_{{ $article->article_id }}">View Abstract</button></div>
			</div>
			<div class="form-group row border-bottom pb-2 mx-0">
				<label class="control-label col-lg-3"><strong>Journal:</strong></label>
				<label class="control-label col-lg-9 font-weight-normal">{{$journal->title}}</label>
			</div>
			<div class="form-group row border-bottom pb-2 mx-0">
				<label class="control-label col-lg-3"><strong>Price:</strong></label>
				<label class="control-label col-lg-9 font-weight-normal">
				@if($DownloadAccess)
				0
				@else
					${{$journal->epub_price}}
				@endif
				</label>
			 </div>
		
		
			<!--View Abstract -->
			<!---------------------------------------------------------------------->
			<!---------------------------------------------------------------------->
			<div class="modal fade" id="abstract_{{$article->article_id}}" tabindex="-1" role="dialog" aria-hidden="true">
				<div class="modal-dialog modal-lg" role="document">
					<div class="modal-content">
						<div class="modal-header">
						<h5 class="modal-title"> Abstract</h5>
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
						</button>
						</div>
						<div class="modal-body text-justify">

						<p>{!! html_entity_decode($article->abstract) !!}</p>

						</div>
						<div class="modal-footer">
						<button type="button" class="btn btn-outline-dark" data-dismiss="modal">Close</button>
						</div>
					</div>
				</div>
			</div>
			<!---------------------------------------------------------------------->
			<!---------------------------------------------------------------------->
			

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

<div class="col-lg-6">

<div class="card bigbox-hvr-slow">
<div class="card-body">
			
{{ Form::open(array('url' => 'full-text-inquiry/'.$article->article_id)) }}
    @csrf
		 <h5>Inquiry Form 
   		<small class="d-block d-sm-inline float-md-right mt-xs-2"><span class="text-danger">*</span> All feilds are required</small></h5>
		 <hr class="mb-0">
		@if ($errors->any())
	
		<div class="alert alert-danger">
			<strong>Whoops!</strong> There were some problems with your input.<br>
			<ul>
				@foreach ($errors->all() as $error)
					<li>{{ $error }}</li>
				@endforeach
			</ul>
		</div>
	
		@endif
		
		@php 
			$name_value = '' ;			
			$email_name_value = '';
			$address_name_value = '';
			$phone_name_value = '';
		@endphp
   		
		<div class="form-row">
			<div class="form-group col-md-12">
				<label class="control-label">Name: <span class="text-danger">*</span></label>
				
				@if(request('name'))
					@php $name_value = request('name'); @endphp
				@elseif($detail['name'])
					@php $name_value = $detail['name']; @endphp
				@endif
				
			<input type="text" maxlength="50" name="name" size="60" value="{{$name_value}}" class="form-control" placeholder="Name">
			</div>
			
			<div class="form-group col-md-12">
				<label for="edit-email">Email: <span class="text-danger">*</span></label>
				@if(request('email'))
					@php ($email_name_value = request('email')) @endphp
				@elseif($detail['email'])
					@php ($email_name_value = $detail['email']) @endphp
				@endif
				<input type="text" maxlength="50" name="email" id="" size="60" value="{{$email_name_value}}" class="form-control" placeholder="Email">
			</div>
			
			<div class="form-group col-md-12">
				<label for="edit-email">Address:</label>
				@if(request('address'))
					@php ($address_name_value = request('address')) @endphp
				@elseif($detail['address'])
					@php ($address_name_value = $detail['address']) @endphp
				@endif
				<textarea type="text" maxlength="200" name="address" id="" size="60" value="" class="form-control" placeholder="Address">{{$address_name_value}}</textarea>
			</div>
			
			<div class="form-group col-md-12">
				<label for="edit-email">Phone:</label>
				@if(request('phone'))
					@php ($phone_name_value = request('phone')) @endphp
				@elseif($detail['phone'])
					@php ($phone_name_value = $detail['phone']) @endphp
				@endif
				<input type="text" maxlength="50" name="phone" id="" size="60" value="{{$phone_name_value}}" class="form-control" placeholder="Phone">
			</div>

			<div class="form-group col-md-12">
	              <!--label for="password" class="col-md-4  col-form-label text-md-right">Captcha</label-->
              <div class="form-group row mt-3 w-100"> 
	                                    <div class="col-auto mx-auto w-100 d-flex ">
                          <div class="col-md-6 text-right">
                              <div class="captcha">                                       
                                  <span>{!! captcha_img() !!}</span>             
                              </div>
                          </div>
                          <div class="col-md-6">                                        
                              <button type="button" class="btn btn-danger" class="refresh-captcha" id="refresh-captcha">
                                  &#x21bb;
                              </button> 
                          </div>
                      </div>
                      <div class="form-group my-2 mx-auto">
                          <input id="captcha" type="text" class="form-control" placeholder="Enter Captcha" name="captcha">
                          @if ($errors->has('captcha'))

                            <span class="invalid-feedback" style="display: block;">

                                <strong>{{ $errors->first('captcha') }}</strong>

	                      </span>
	                  @endif
                      </div>
              </div>	              
	        </div>
	              
			
		</div>
		<hr>
		<div class="text-center">
		   <a class="btn btn-outline-dark" href="{{ URL::previous() }}">Back</a>
		   <input class="btn btn-primary" name="issue_purchase_form" type="submit" value="Preview">
   		</div>
		{{ Form::close() }}		

	
	  
	</div>
				
        </div>
    
      </div>
    </div>
</div>
  </section>
  
</main>

@endsection