@extends(templates/layout_normal)

@section(main)
    <h2>Connect with Google</h2>
    <div class="box compactBox">
        <?php if (!$success): ?>
            <p class="error justify"><?= $error ?></p>
        <?php else: ?>
            <form id="connectGoogleForm" action="<?= Container::$routeCollection->getRoute('account.googleConnect-action')->generateLink() ?>" method="post" data-redirect-on-success="<?= Container::$routeCollection->getRoute('account')->generateLink() ?>">
                <p class="justify marginBottom">Your account will be connected with the following Google account: <b><?= $googleAccount ?></b></p>
                <input type="email" style="display: none;" name="email" autocomplete="username" value="<?= $userEmail ?>">
                <p class="formLabel marginTop">Password</p>
                <input type="password" class="text big fullWidth" name="password" autocomplete="current-password" required minlength="6" autofocus>
                <p class="formError justify marginTop"></p>
                <div class="right marginTop">
                    <button class="marginRight" type="submit" name="submit"><i class="fa-solid fa-link"></i> Connect</button><!--
                 --><a class="button gray" href="<?= Container::$routeCollection->getRoute('account')->generateLink() ?>" title="Back to account">Cancel</a>
                </div>
            </form>
        <?php endif; ?>
    </div>
@endsection