@extends('master')

@section('title')
    Company Deeds Data
@stop

@section('styles')

@stop

@section('content')

@include('partials.nav')

<h1>Company Deeds</h1>

<p>This Report can also be used when a business or director signs surety on a property. This Report will tell us if there is in fact equity in the property. Property details of ownership from Compuscan that include: purchase price, erf details, bond amount, equity available and ownership details. This Report can also be used when a business or director signs surety on a property. This Report will tell us if there is in fact equity in the property.</p>
<hr style="margin-top: 10px;">

<form id="mainForm" method="POST" action="/compuscan-company-deeds" accept-charset="UTF-8" enctype="multipart/form-data">

<div class="row">
    <div class="large-6 columns">
         <!-- required -->
        @if($errors->first('businessName'))
            <label class="red">Business name *</label>
            {{ Form::text('businessName', '', ['class' => 'formFieldGrey', 'style'=>"border: 2px solid rgba(255, 0, 0, 0.3)"]) }}
        @else
            <label>Business name *</label>
            <input type="text" id="businessName" name="businessName" class="formFieldGrey" onkeyup="checkFormsValidity();" required/>
        @endif
    </div>
    <div class="large-6 columns">
        <!-- required -->
        @if($errors->first('regNumber'))
            <label class="red">Registration Number *</label>
            {{ Form::text('regNumber', '', ['class' => 'formFieldGrey', 'style'=>"border: 2px solid rgba(255, 0, 0, 0.3)"]) }}
        @else
            <label>Registration Number *</label>
            <input type="text" id="regNumber" name="regNumber" class="formFieldGrey" onkeyup="checkFormsValidity();" required/>
        @endif
    </div>
</div>

<p>Supplier:</p>
<img style="margin-left:auto;margin-right: auto;display: block;" width="10%" src="/img/compuscan_logo.jpg" />
<p>R{{$compuscanCompanyDeeds}}</p>

<a href="#" data-reveal-id="offer11"><button class="myButton" id="submitBtn">Request</button></a>

        <div id="offer11" class="reveal-modal small" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
		    <h1>Confirm Order</h1>
		    <p><strong>Service Provider: </strong> Compuscan</p>
		    <p><strong>Report type: </strong> Commercial Deeds Report</p>
		    <p><strong>Turnaround Time: </strong> Instant</p>
		    <p><strong>Amount Ex VAT: </strong> R{{$compuscanCompanyDeeds}}</p>
		    <hr>
		    <span style="color:#daab2b;">By selecting “confirm Order” you agree to the terms and conditions provided to you in terms of your agreement with Prestige.</span>
            <hr>
           <button id="submit" class="myButton" type="submit">Confirm</button>
           <a class="close-reveal-modal" aria-label="Close">&#215;</a>
        </div>

</form>
<hr>
@include('partials.footer')

@section('scripts')
<script>
var sbmtBtn = document.getElementById("submitBtn");
sbmtBtn.disabled = true;

checkFormsValidity = function(){
var myforms = document.forms["mainForm"];
    if (myforms.checkValidity()) {
        sbmtBtn.disabled = false;
    } else {
        sbmtBtn.disabled = true;
    }
}
</script>
<script>
    $('#submitBtn').click(function() {
         $('#lname').text($('#lastname').val());
         $('#fname').text($('#firstname').val());
    });

    $('#submit').click(function(){
        $('#mainForm').submit();
    });
</script>
<script>
document.getElementById("submit").onclick = function() {
    //disable
    this.disabled = true;
}
</script>
@stop