Created
April 1, 2016 13:52
-
-
Save jongravois/311b813f98a9e37fbbcb0a427d2766ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('title', 'ADC Trial') | |
@push('styles') | |
<link href="/css/register.css" rel="stylesheet"> | |
@endpush | |
@section('body_class', 'short__page'); | |
@section('content') | |
<style> | |
label.error, .errored { | |
color: red; | |
font-style: italic; | |
font-size: 0.8em; | |
} | |
.has-error .help-block, .has-error .control-label, .has-error .radio, .has-error .checkbox, .has-error .radio-inline, .has-error .checkbox-inline { | |
margin: -10px 0 -0px 0; | |
color: #FF2400; | |
} | |
.has-error .form-control { | |
border-color: #FF2400; | |
} | |
</style> | |
<div id="register"> | |
<div class="register__panel"> | |
<h1>REGISTER FOR A FREE TRIAL</h1> | |
{!! Form::open(['url' => 'register', 'id' => 'payment-form', 'class' => 'frmReg' ]) !!} | |
{!! Form::hidden('type', $type) !!} | |
<span class="payment-errors"></span> | |
<div id="email_group" class="form-group @if ($errors->has('email')) has-error @endif"> | |
{!! Form::label('email', "Your Company Email Address - Your Username") !!} | |
@if ($errors->has('email')) <p class="help-block">{{ $errors->first('email') }}</p> @endif | |
{!! Form::text('email', old('email'), ['class' => 'form-control', 'placeholder' => '[email protected]']) !!} | |
</div> | |
<div id="password_group" class="form-group @if ($errors->has('password')) has-error @endif"> | |
{!! Form::label('password', "Your Desired Password") !!} | |
@if ($errors->has('password')) <p class="help-block">{{ $errors->first('password') }}</p> @endif | |
{!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'Your Desired Password', 'autocomplete' => 'off']) !!} | |
</div> | |
<div id="password2_group" class="form-group @if ($errors->has('password2')) has-error @endif"> | |
{!! Form::label('password2', "Confirm Your Password") !!} | |
@if ($errors->has('password2')) <p class="help-block">{{ $errors->first('password2') }}</p> @endif | |
{!! Form::password('password2', ['class' => 'form-control', 'placeholder' => 'Confirm Your Password', 'autocomplete' => 'off']) !!} | |
</div> | |
<div id="company_group" class="form-group @if ($errors->has('company')) has-error @endif"> | |
{!! Form::label('company', "Your Full Company Name") !!} | |
@if ($errors->has('company')) <p class="help-block">{{ $errors->first('company') }}</p> @endif | |
{!! Form::text('company', old('company'), ['class' => 'form-control', 'placeholder' => 'My Company, Inc']) !!} | |
</div> | |
<div id="dba_group" class="form-group @if ($errors->has('dba')) has-error @endif"> | |
{!! Form::label('dba', "Your Company's Common Name or DBA") !!} | |
@if ($errors->has('dba')) <p class="help-block">{{ $errors->first('dba') }}</p> @endif | |
{!! Form::text('dba', old('dba'), ['class' => 'form-control', 'placeholder' => 'My Company or MYC']) !!} | |
</div> | |
<div id="country_id_group" class="form-group"> | |
{!! Form::label('country_id', 'Country of Operation') !!} | |
{!! Form::select('country_id', $countries, '184', ['class' => 'form-control']) !!} | |
</div> | |
<div id="billing-address-group" class="form-group @if ($errors->has('billing_address')) has-error @endif"> | |
{!! Form::label('billing_address', "Address") !!} | |
@if ($errors->has('billing_address')) <p class="help-block">{{ $errors->first('billing_address') }}</p> @endif | |
{!! Form::text('billing_address', old('billing_address'), ['class' => 'form-control', 'placeholder' => 'Address']) !!} | |
</div> | |
<div id="billing-address2-group" class="form-group @if ($errors->has('billing_address2')) has-error @endif"> | |
{!! Form::label('billing_address2', "Address 2") !!} | |
@if ($errors->has('billing_address2')) <p class="help-block">{{ $errors->first('billing_address2') }}</p> @endif | |
{!! Form::text('billing_address2', old('billing_address2'), ['class' => 'form-control', 'placeholder' => 'Address 2']) !!} | |
</div> | |
<div id="firstname_group" class="form-group @if ($errors->has('firstname')) has-error @endif"> | |
{!! Form::label('firstname', "Your First Name") !!} | |
@if ($errors->has('firstname')) <p class="help-block">{{ $errors->first('firstname') }}</p> @endif | |
{!! Form::text('firstname', old('firstname'), ['class' => 'form-control', 'placeholder' => 'Your First Name']) !!} | |
</div> | |
<div id="lastname_group" class="form-group @if ($errors->has('lastname')) has-error @endif"> | |
{!! Form::label('lastname', "Your Last Name") !!} | |
@if ($errors->has('lastname')) <p class="help-block">{{ $errors->first('lastname') }}</p> @endif | |
{!! Form::text('lastname', old('lastname'), ['class' => 'form-control', 'placeholder' => 'Your Last Name']) !!} | |
</div> | |
<div id="phone_group" class="form-group @if ($errors->has('phone')) has-error @endif"> | |
{!! Form::label('phone', "Your Business Phone Number") !!} | |
@if ($errors->has('phone')) <p class="help-block">{{ $errors->first('phone') }}</p> @endif | |
{!! Form::text('phone', old('phone'), ['class' => 'form-control', 'placeholder' => 'Your Business Phone Number', 'data-mask' => '+1 (999) 999.9999']) !!} | |
</div> | |
<div id="seller_group" class="form-group"> | |
<label for="can_sell"> | |
I am an asset owner and plan to sell components | |
<br> | |
{!! Form::radio('can_sell', '1', true) !!} Yes | |
| |
{!! Form::radio('terms_agree', '0') !!} No | |
</label> | |
</div> | |
<div id="terms_agree_group" class="form-group"> | |
<label for="terms_agree"> | |
I agree to the <a href="{{ route('terms') }}" target="_blank">terms of service</a> & <a href="{{ route('privacy') }}" target="_blank">privacy policy</a> | |
<br> | |
{!! Form::radio('terms_agree', 'Yes', true) !!} Yes | |
| |
{!! Form::radio('terms_agree', 'No') !!} No | |
</label> | |
</div> | |
<div id="contact_please_group" class="form-group"> | |
<label for="contact_please"> | |
I'd like to receive the latest news/events from ADC. | |
<br> | |
{!! Form::radio('contact_please', 'Yes', true) !!} Yes | |
| |
{!! Form::radio('contact_please', 'No') !!} No | |
</label> | |
</div> | |
<br> | |
<div id="ccnum_group" class="form-group @if ($errors->has('ccnum')) has-error @endif"> | |
{!! Form::label('ccnum', "Credit Card Number*") !!} | |
@if ($errors->has('ccnum')) <p class="help-block">{{ $errors->first('ccnum') }}</p> @endif | |
<input type="text" class="form-control" placeholder="Credit Card Number" autocomplete="off" data-stripe="number"> | |
</div> | |
<div id="card_name_group" class="form-group @if ($errors->has('card_name')) has-error @endif"> | |
{!! Form::label('card_name', "Name on Credit Card") !!} | |
@if ($errors->has('card_name')) <p class="help-block">{{ $errors->first('card_name') }}</p> @endif | |
<input type="text" class="form-control" placeholder="Name on Credit Card" autocomplete="off" date-stripe="name"> | |
</div> | |
<div id="billing-postal-code-group" class="form-group @if ($errors->has('billing_postal_code')) has-error @endif"> | |
{!! Form::label('billing_postal_code', "Postal Code") !!} | |
@if ($errors->has('billing_postal_code')) <p class="help-block">{{ $errors->first('billing_postal_code') }}</p> @endif | |
<input type="text" class="form-control" placeholder="Postal Code" data-stripe="address_zip"> | |
</div> | |
<div id="expiration_group"> | |
<div class="row"> | |
<div class="col-xs-4"> | |
{!! Form::label('exmo', "Expiration") !!} | |
<select class="form-control" data-stripe="exp_month"> | |
<option value="">Month</option> | |
<option value="01">Jan (01)</option> | |
<option value="02">Feb (02)</option> | |
<option value="03">Mar (03)</option> | |
<option value="04">Apr (04)</option> | |
<option value="05">May (05)</option> | |
<option value="06">Jun (06)</option> | |
<option value="07">Jul (07)</option> | |
<option value="08">Aug (08)</option> | |
<option value="09">Sep (09)</option> | |
<option value="10">Oct (10)</option> | |
<option value="11">Nov (11)</option> | |
<option value="12">Dec (12)</option> | |
</select> | |
</div> | |
<div class="col-xs-4"> | |
<label > </label> | |
<select class="form-control" data-stripe="exp_year"> | |
@foreach($yrs as $yr) | |
<option>{{$yr}}</option> | |
@endforeach | |
</select> | |
</div> | |
<div class="col-xs-4"> | |
{!! Form::label('ccv', "Security Code") !!} | |
<input type="text" class="form-control" placeholder="Security Code" autocomplete="off" data-strip="cvc"> | |
</div> | |
</div> | |
</div> {{--END EXPIRATION GROUP--}} | |
<br> | |
<p class="small__print"> | |
* Your 14-day free trial begins once you click the "Start My Free Trial!" button. If you cancel your subscription within the trial period, your credit card will not be charged. If you don't cancel by day 14, your card will be charged to begin your first month of service. You can cancel your subscription at any time. | |
</p> | |
<br><br> | |
{!! Form::submit('Start My Free Trial', ['class' => "btn btn-adc btn-block"]) !!} | |
{!! Form::close() !!} | |
<div> | |
</div> | |
</div> | |
</div> | |
@endsection | |
@push('scripts') | |
<script type="text/javascript" src="/js/register.js"></script> | |
<script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
<script type="text/javascript"> | |
Stripe.setPublishableKey({{ env('STRIPE_SECRET') }}); | |
</script> | |
<script> | |
$(function() { | |
$('#payment-form').submit(function(event) { | |
var $form = $(this); | |
$form.find('button').prop('disabled', true); | |
Stripe.card.createToken($form, stripeResponseHandler); | |
function stripeResponseHandler(status, response) { | |
var $form = $('#payment-form'); | |
if (response.error) { | |
// Show the errors on the form | |
$form.find('.payment-errors').text(response.error.message); | |
$form.find('button').prop('disabled', false); | |
} else { | |
var token = response.id; | |
$form.append($('<input type="hidden" name="stripeToken" />').val(token)); | |
$form.get(0).submit(); | |
} | |
}; | |
return false; | |
}); | |
}); | |
</script> | |
@endpush |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment