| Current Path : /home/rtorresani/www/vendor/magento/module-paypal/view/frontend/templates/billing/ |
| Current File : //home/rtorresani/www/vendor/magento/module-paypal/view/frontend/templates/billing/agreements.phtml |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var \Magento\Paypal\Block\Billing\Agreements $block
*/
$billingAgreements = $block->getBillingAgreements();
$paymentMethods = $block->getWizardPaymentMethodOptions();
?>
<div class="account-billing-agreements">
<?php if (count($billingAgreements) > 0) : ?>
<?= $block->getChildHtml('pager') ?>
<div class="table-wrapper billing-agreements">
<table id="billing-agreements" class="data table table-billing-agreements">
<caption class="table-caption"><?= $block->escapeHtml(__('Billing Agreements')) ?></caption>
<thead>
<tr>
<th scope="col" class="col id"><?= $block->escapeHtml(__('Reference ID')) ?></th>
<th scope="col" class="col status"><?= $block->escapeHtml(__('Status')) ?></th>
<th scope="col" class="col created"><?= $block->escapeHtml(__('Created At')) ?></th>
<th scope="col" class="col updated"><?= $block->escapeHtml(__('Updated At')) ?></th>
<th scope="col" class="col payment"><?= $block->escapeHtml(__('Payment Method')) ?></th>
<th scope="col" class="col actions"> </th>
</tr>
</thead>
<tbody>
<?php foreach ($billingAgreements as $item) : ?>
<tr>
<td data-th="<?= $block->escapeHtml(__('Reference ID')) ?>" class="col id">
<?= $block->escapeHtml($block->getItemValue($item, 'reference_id')) ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Status')) ?>" class="col status">
<?= $block->escapeHtml($block->getItemValue($item, 'status')) ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Created At')) ?>" class="col created">
<?= $block->escapeHtml($block->getItemValue($item, 'created_at')) ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Updated At')) ?>" class="col updated">
<?= $block->escapeHtml($block->getItemValue($item, 'updated_at')) ?>
</td>
<td data-th="<?= $block->escapeHtml(__('Payment Method')) ?>" class="col payment">
<?= $block->escapeHtml($block->getItemValue($item, 'payment_method_label')) ?>
</td>
<td data-th="" class="col actions">
<a href="<?= $block->escapeUrl($block->getItemValue($item, 'edit_url')) ?>"
class="action view">
<span><?= $block->escapeHtml(__('View')) ?></span>
</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else : ?>
<div class="message info empty">
<span><?= $block->escapeHtml(__('There are no billing agreements yet.')) ?></span>
</div>
<?php endif; ?>
<?php if ($paymentMethods) : ?>
<form action="<?= $block->escapeUrl($block->getCreateUrl()) ?>" method="post"
class="form form-new-agreement">
<fieldset class="fieldset">
<legend class="legend">
<span><?= $block->escapeHtml(__('New Billing Agreement')) ?></span>
</legend>
<br />
<p class="note">
<?= $block->escapeHtml(__('You will be redirected to the payment system website.')) ?>
</p>
<div class="field payment method">
<div class="control">
<select id="payment_method" name="payment_method">
<option value=""><?= $block->escapeHtml(__('-- Please Select --')) ?></option>
<?php foreach ($paymentMethods as $code => $title) : ?>
<option value="<?= $block->escapeHtml($code) ?>">
<?= $block->escapeHtml($title) ?>
</option>
<?php endforeach; ?>
</select>
</div>
</div>
<div class="actions-toolbar">
<div class="primary">
<button type="submit" class="primary action create">
<span><?= $block->escapeHtml(__('Create...')) ?></span>
</button>
</div>
<div class="secondary">
<a href="<?= $block->escapeUrl($block->getBackUrl()) ?>" class="action back">
<span><?= $block->escapeHtml(__('Back')) ?></span>
</a>
</div>
</div>
</fieldset>
</form>
<?php else : ?>
<div class="actions-toolbar">
<div class="secondary">
<a href="<?= $block->escapeUrl($block->getBackUrl()) ?>" class="action back">
<span><?= $block->escapeHtml(__('Back')) ?></span>
</a>
</div>
</div>
<?php endif; ?>
</div>