File: /var/www/html/punjabcabs/storage/framework/views/6b9cad33794dbe18fb922bec5a6eab4c5da36c17.php
<?php $__env->startSection('content'); ?>
<!-- Page Header -->
<div class="page-header">
<div class="container">
<h2 class="page-title">Register</h2>
</div>
</div>
<!-- Page Header End -->
<div class="cps-section cps-section-padding custom-padding">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2 col-xs-12">
<div class="cps-section-header text-center">
<h3 class="cps-section-title">Create your account and get moving in minutes</h3>
<p class="cps-section-text">Welcome to <?php echo e(Setting::get('site_title', 'Unicotaxi')); ?>, the easiest way to get around at the tap of a button.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
<div class="login-with-social" style="margin-bottom: 25px;">
<a class="twitter-login" href="<?php echo e(url('login')); ?>">ALREADY HAVE AN ACCOUNT?</a>
</div>
<form id="loginForm" class="account-form" action="<?php echo e(url('/register')); ?>" method="POST">
<div id="first_step">
<div class="col-md-4">
<input value="+91" type="text" placeholder="+1" id="country_code" name="country_code" />
</div>
<div class="col-md-8">
<input type="text" autofocus id="phone_number" placeholder="Enter Phone Number" name="phone_number" value="<?php echo e(old('phone_number')); ?>" />
</div>
<div class="col-md-8">
<?php if($errors->has('phone_number')): ?>
<span class="help-block">
<strong><?php echo e($errors->first('phone_number')); ?></strong>
</span>
<?php endif; ?>
</div>
<div class="col-md-12" style="padding-bottom: 10px;" id="mobile_verfication">
<input type="button" onclick="smsLogin();" value="Verify Phone Number"/>
</div>
</div>
<?php echo e(csrf_field()); ?>
<div id="second_step" style="display: none;">
<div class="col-md-6">
<input type="text" placeholder="First Name" name="first_name" value="<?php echo e(old('first_name')); ?>">
<?php if($errors->has('first_name')): ?>
<span class="help-block">
<strong><?php echo e($errors->first('first_name')); ?></strong>
</span>
<?php endif; ?>
</div>
<div class="col-md-6">
<input type="text" placeholder="Last Name" name="last_name" value="<?php echo e(old('last_name')); ?>">
<?php if($errors->has('last_name')): ?>
<span class="help-block">
<strong><?php echo e($errors->first('last_name')); ?></strong>
</span>
<?php endif; ?>
</div>
<div class="col-md-12">
<input type="email" name="email" placeholder="Email Address" value="<?php echo e(old('email')); ?>">
<?php if($errors->has('email')): ?>
<span class="help-block">
<strong><?php echo e($errors->first('email')); ?></strong>
</span>
<?php endif; ?>
</div>
<div class="col-md-12">
<input type="password" name="password" placeholder="Password">
<?php if($errors->has('password')): ?>
<span class="help-block">
<strong><?php echo e($errors->first('password')); ?></strong>
</span>
<?php endif; ?>
</div>
<div class="col-md-12">
<input type="password" placeholder="Re-type Password" name="password_confirmation">
<?php if($errors->has('password_confirmation')): ?>
<span class="help-block">
<strong><?php echo e($errors->first('password_confirmation')); ?></strong>
</span>
<?php endif; ?>
</div>
<div class="col-md-12">
<button type="submit">REGISTER</button>
</div>
</div>
</form>
<div class="text-center col-md-12">
Or <a href="<?php echo e(route('login')); ?>">Sign in</a> with your account
</div>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script src="https://sdk.accountkit.com/en_US/sdk.js"></script>
<script>
// initialize Account Kit with CSRF protection
AccountKit_OnInteractive = function(){
AccountKit.init(
{
appId: <?php echo e(env('FB_APP_ID')); ?>,
state:"state",
version: "<?php echo e(env('FB_APP_VERSION')); ?>",
fbAppEventsEnabled:true
}
);
};
// login callback
function loginCallback(response) {
if (response.status === "PARTIALLY_AUTHENTICATED") {
var code = response.code;
var csrf = response.state;
// Send code to server to exchange for access token
$('#mobile_verfication').html("<p class='helper'> * Phone Number Verified </p>");
$('#phone_number').attr('readonly',true);
$('#country_code').attr('readonly',true);
$('#second_step').fadeIn(400);
$.post("<?php echo e(route('account.kit')); ?>",{ code : code }, function(data){
$('#phone_number').val(data.phone.national_number);
$('#country_code').val('+'+data.phone.country_prefix);
});
}
else if (response.status === "NOT_AUTHENTICATED") {
// handle authentication failure
$('#mobile_verfication').html("<p class='helper'> * Authentication Failed </p>");
}
else if (response.status === "BAD_PARAMS") {
// handle bad parameters
}
}
// phone form submission handler
function smsLogin() {
var countryCode = document.getElementById("country_code").value;
var phoneNumber = document.getElementById("phone_number").value;
$('#mobile_verfication').html("<p class='helper'> Please Wait... </p>");
$('#phone_number').attr('readonly',true);
$('#country_code').attr('readonly',true);
AccountKit.login(
'PHONE',
{countryCode: countryCode, phoneNumber: phoneNumber}, // will use default values if not specified
loginCallback
);
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('user.layout.auth', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>