
@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">
          	<h5>ePub [ahead of print] Inquiry Form:</h5>
			
			@if((isset($thankyou)))	
				<div class="alert alert-success">
				  <center><strong>Thankyou for Submitting EPub full text inquiry form</strong></center>
				</div>	
			@endif
			
				@if(!isset($migs_transaction) && !isset($paypal_transaction))
				<hr>
				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.<br>	

				@endif


          </div>
				

		  @if(isset($migs_transaction) && $migs_transaction == 'success')
			<div class="alert alert-success">
			
			  <strong>Thank You </strong> <br>
				We appreciate you taking the time to fill out the Epub Inquiry Form.<br>
				Your submission has been emailed to the concern department.<br>
				If your request requires a reply, we will be in contact with you shortly. In the meantime, please continue to browse the site.<br> 
				Use the links above to get to where you want to go!
			</div>	
			
		@elseif(isset($migs_transaction) && $migs_transaction == 'cancel')
		
			
			<div class="alert alert-danger">
			  <strong>Error while Transaction with Master Card</strong><br> The transaction has been failed,It appears that there is some issue in the processing of your transaction at the bank.
			</div>	
			
		@include('form.full_text_inquiry_paypal_form')
		
			
		@elseif(isset($paypal_transaction) && $paypal_transaction == 'success')
			<div class="alert alert-success">
			
			  <strong>Thank You </strong> <br>
				We appreciate you taking the time to fill out the Epub Inquiry Form.<br>
				Your submission has been emailed to the concern department.<br>
				If your request requires a reply, we will be in contact with you shortly. In the meantime, please continue to browse the site.<br> 
				Use the links above to get to where you want to go!
			</div>	
			
		@elseif(isset($paypal_transaction) && $paypal_transaction == 'failed')
			
			<div class="alert alert-danger">
			  <strong>Error while Transaction with Paypal</strong><br> The transaction has been failed,It appears that there is some issue in the processing of your transaction at the bank.
			</div>	
			
		@elseif(isset($paypal_transaction) && $paypal_transaction == 'cancel')
		
			<div class="alert alert-warning">
			  <strong>Cancelled </strong> <br> The transaction Cancelled
			</div>	

		@endif

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

   <h5 class="m-0">Article Detail:</h5>
   <hr>
			<div class="form-group row border-bottom pb-2">
				<label class="control-label col-lg-3 align-top"><strong>Title:</strong></label>
				<label class="control-label col-lg-9">{{$article->title}}</label>
			</div>
			<div class="form-group row border-bottom pb-2">
				<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">
				<label class="control-label col-lg-3"><strong>Journal:</strong></label>
				<label class="control-label col-lg-9">{{$journal->title}}</label>
			</div>
			<div class="form-group row border-bottom pb-2">
				<label class="control-label col-lg-3"><strong>Price:</strong></label>				<label class="control-label col-lg-9">
				@if($DownloadAccess)
				$0
				@else
					${{$journal->epub_price}}
				@endif	
				</label>
			</div>
			 </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">

						<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 class="col-lg-6 mt-4"> 
<div class="card bigbox-hvr-slow">
<div class="card-body">
	

			@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

			<h5 class="m-0">Full Text Inquiry</h5>
				
				<hr>
			<div class="form-group row border-bottom pb-2">
				<label class="control-label col-xl-2 col-lg-3 col-md-3 align-top">Name:</label>
				<label class="control-label col-xl-10 col-lg-9 col-md-9">{{$detail['name']}} </label>
			</div>
			<div class="form-group row border-bottom pb-2">
				<label class="control-label col-xl-2 col-lg-3 col-md-3 align-top">Email:</label>
				<label class="control-label col-xl-10 col-lg-9 col-md-9">{{$detail['email']}}</label>
			</div>
			@if(!empty($detail['address']))
			<div class="form-group row border-bottom pb-2">
				<label class="control-label col-xl-2 col-lg-3 col-md-3 align-top">Address:</label>
				<label class="control-label col-xl-10 col-lg-9 col-md-9">{{$detail['address']}}</label>
			</div>
			@endif
			@if(!empty($detail['phone']))
			<div class="form-group row border-bottom pb-2">
				<label class="control-label col-xl-2 col-lg-3 col-md-3 align-top">Phone:</label>
				<label class="control-label col-xl-10 col-lg-9 col-md-9">{{$detail['phone']}}</label>
			</div>
			@endif
			

		

		@if(!(isset($paypal_transaction)) && !(isset($migs_transaction)) )	

			@if((isset($thankyou)))	
				
			@else
				{{ Form::open(array('url' => 'full-text-inquiry/'.$article->article_id)) }}

				<input name="name" type="hidden" value="{{$detail['name']}}">			
				<input name="email" type="hidden" value="{{$detail['email']}}">
				<input name="address" type="hidden" value="{{$detail['address']}}">
				<input name="phone" type="hidden" value="{{$detail['phone']}}">
				<hr>
				<div class="text-center">
				<a class="btn btn-outline-dark" href="/full-text-inquiry/{{$article->article_id}}">Back</a>
				<input class="btn btn-primary" name="full_text_inquiry_form" type="submit" value="Submit">
				</div>

				{{ Form::close() }}		
			@endif
		@endif
		

	 
	  
	</div>
				
        </div>

    </div>
    
      </div>
    </div>
  </section>
  
</main>
@endsection