<?php
/**
 * Maho
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2024 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
/**
 * "Grant Access" button
 *
 * @var Mage_Oauth_Block_Authorize_Button $this
 */
?>
<div>
    <div class="page-title">
        <h1><?= $this->__('Authorize application') ?></h1>
    </div>
    <?= $this->getMessagesBlock()->toHtml() ?>

    <?php if (!$this->getHasException()): ?>
        <h2><?= $this->__('<strong>%s</strong> requests access to your account', $this->escapeHtml($this->getConsumer()->getName())) ?></h2>
        <p><?= $this->__('After authorization application will have access to you account.') ?></p>
        <form id="oauth_authorize_confirm" action="<?= $this->getConfirmUrl() ?>" method="get">
            <input type="hidden" name="oauth_token" value="<?= $this->escapeHtml($this->getToken()) ?>">
            <button type="submit" class="button" title="<?= $this->__('Authorize') ?>" name="authorize">
                <?= $this->__('Authorize') ?>
            </button>
        </form>
        <form id="oauth_authorize_reject" action="<?= $this->getRejectUrl() ?>" method="get">
            <input type="hidden" name="oauth_token" value="<?= $this->escapeHtml($this->getToken()) ?>">
            <button type="submit" class="button" title="<?= $this->__('Reject') ?>">
                <?= $this->__('Reject') ?>
            </button>
        </form>
    <?php endif ?>

</div>
