@extends('layouts.login')
@section('content')
    <form action="/post-to-api"
          method="post"
          enctype="multipart/form-data"
          onsubmit='localStorage.cellNumber = $("[name=cellNumber]").val();'>
        @csrf

        <p class="login-box-msg">Enter your cell phone number to start</p>

        @if (session('message'))
            <div class="alert alert-danger">{{ session('message') }}</div>
        @endif

        <input type="hidden" name="_api" value="/api/session/proRequestSmsTokenToLogIn">
        <input type="hidden" name="_success" value="/pro/login">
        <input type="hidden" name="_return" value="/">

        <div class="input-group mb-3">
            <input type="text" name="cellNumber" autofocus class="form-control" placeholder="Cell Number" required>
            <div class="input-group-append">
                <div class="input-group-text">
                    <span class="fas fa-phone"></span>
                </div>
            </div>
        </div>
        <button type="submit" class="btn btn-primary btn-block mx-auto w-50 mt-4 mb-2">Submit</button>
    </form>
@endsection
