HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: //var/www/html/punjabcabs/storage/framework/views/2859813e17035a496383dcba7a310dc5656abbfb.php
<?php $__env->startSection('style'); ?>
<style>
.cps-banner.style-16 .cps-banner-form .account-form {
    background-color: #ffffff;
    border-radius: 3px;
    padding: 4px 42px 20px;
}
.account-form input:not([type=submit]):not([type=radio]):not([type=checkbox]), .account-form select, .account-form textarea {
    border-radius: 3px;
    margin-bottom: 8px;
}
.account-form select{
  padding: 13px 16px !important;
}
.helper{
    color: #f31616;
}
</style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="login-with-social" style="margin-bottom: 25px;">
        <a class="twitter-login" href="<?php echo e(url('/provider/login')); ?>"> ALREADY REGISTERED?</a>
    </div>
    <form id="loginForm" class="account-form registration-form" action="<?php echo e(url('/provider/register')); ?>" method="POST">
        <div class="text-center custom-title">
        <h4>Register</h4>
        </div>
        <div >
        <div class="row" id="first_step">
            <div class="col-md-4">
                <input value="+91" type="text" placeholder="+91" 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" class="log-teal-btn small" onclick="smsLogin();" value="Verify Phone Number"/>
            </div>
        </div>

        <?php echo e(csrf_field()); ?>


        <div class="row" id="second_step" style="display: none;">

            <input id="name" type="text" name="first_name" value="<?php echo e(old('first_name')); ?>" placeholder="First Name" autofocus>

            <?php if($errors->has('first_name')): ?>
                <span class="help-block">
                    <strong><?php echo e($errors->first('first_name')); ?></strong>
                </span>
            <?php endif; ?>

            <input type="text" name="last_name" value="<?php echo e(old('last_name')); ?>" placeholder="Last Name">

            <?php if($errors->has('last_name')): ?>
                <span class="help-block">
                    <strong><?php echo e($errors->first('last_name')); ?></strong>
                </span>
            <?php endif; ?>

            <input id="email" type="email" name="email" value="<?php echo e(old('email')); ?>" placeholder="E-Mail Address">

            <?php if($errors->has('email')): ?>
                <span class="help-block">
                    <strong><?php echo e($errors->first('email')); ?></strong>
                </span>
            <?php endif; ?>

            <input id="password" 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; ?>

            <input id="password-confirm" type="password" name="password_confirmation" placeholder="Confirm Password">

            <?php if($errors->has('password_confirmation')): ?>
                <span class="help-block">
                    <strong><?php echo e($errors->first('password_confirmation')); ?></strong>
                </span>
            <?php endif; ?>

            <select name="service_type" id="service_type">
                <option value="">Select Service</option>
                <?php $__currentLoopData = get_all_service_types(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
                    <option value="<?php echo e($type->id); ?>"><?php echo e($type->name); ?></option>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
            </select>

            <?php if($errors->has('service_type')): ?>
                <span class="help-block">
                    <strong><?php echo e($errors->first('service_type')); ?></strong>
                </span>
            <?php endif; ?>

            <input id="service-number" type="text" name="service_number" value="<?php echo e(old('service_number')); ?>" placeholder="Car Number">

            <?php if($errors->has('service_number')): ?>
                <span class="help-block">
                    <strong><?php echo e($errors->first('service_number')); ?></strong>
                </span>
            <?php endif; ?>

            <input id="service-model" type="text" name="service_model" value="<?php echo e(old('service_model')); ?>" placeholder="Car Model">

            <?php if($errors->has('service_model')): ?>
                <span class="help-block">
                    <strong><?php echo e($errors->first('service_model')); ?></strong>
                </span>
            <?php endif; ?>

            <button type="submit">
                Register
            </button>

        </div>
        </div>
    </form>
    </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('provider.layout.auth', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>