<?php
/**
 * Copyright © 2016 maijindou.com All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * @var \Magento\Braintree\Block\Creditcard\Management $block
 */
$creditCard = $block->creditCard();
$token = $block->escapeHtml($creditCard->token);
?>
<?php echo $block->getLayout()->getMessagesBlock()->getGroupedHtml();?>
<form action="<?php echo $block->escapeUrl($block->getDeleteConfirmUrl()); ?>" method="post" id="delete-form"
      xmlns="http://www.w3.org/1999/html">
    <fieldset class="fieldset info">
        <legend class="legend">
            <?php echo $block->escapeHtml(__('Please confirm that you want to delete this credit card')); ?>
        </legend>
        <div class="field">
            <ul>
                <li>
                    <b><?php echo $block->escapeHtml(__('Credit Card Number'));?></b>
                </li>
                <li>
                    <?php echo $block->escapeHtml($creditCard->maskedNumber);?>
                </li>
                <li>
                    <b><?php echo $block->escapeHtml(__('Expiration Date'));?></b>
                </li>
                <li>
                    <?php echo $block->escapeHtml($creditCard->expirationDate); ?>
                </li>
                <li>
                    <b><?php echo $block->escapeHtml(__('Cardholder Name'));?></b>
                </li>
                <li>
                    <?php echo $block->escapeHtml($creditCard->cardholderName);?>
                </li>
            </ul>
        </div>
    </fieldset>
    <input type="hidden" name="token" value="<?php /* @noEscape */ echo $token; ?>">
    <div class="actions-toolbar">
        <div class="primary">
            <button type="submit" id="opc-submit" data-role="opc-submit" class="action save primary"
                    title="<?php echo $block->escapeHtml(__('Delete')); ?>" >
                <?php echo $block->escapeHtml(__('Delete')); ?>
            </button>
        </div>
        <div class="secondary">
            <a class="action back" href="<?php echo $block->escapeUrl($block->getBackUrl()); ?>">
                <span><small>&laquo; </small><?php echo $block->escapeHtml(__('Back')); ?></span>
            </a>
        </div>
    </div>

</form>
