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

// @codingStandardsIgnoreFile
/**
 * @var \Magento\Paypal\Block\Payment\Form\Billing\Agreement $block
 */
$code = $block->escapeHtml($block->getMethodCode());
?>
<div class="field items required" id="payment_form_<?php /* @noEscape */ echo $code; ?>" style="display:none;">
    <label for="<?php /* @noEscape */ echo $code; ?>_ba_agreement_id" class="label">
        <span><?php echo $block->escapeHtml(__('Billing Agreement')); ?></span>
    </label>
    <div class="control">
        <select id="<?php /* @noEscape */ echo $code; ?>_ba_agreement_id"
                name="payment[<?php echo $block->escapeHtml($block->getTransportName()); ?>]" class="select">
            <option value=""><?php echo $block->escapeHtml(__('-- Please Select Billing Agreement--')); ?></option>
            <?php foreach ($block->getBillingAgreements() as $id => $referenceId): ?>
                <option value="<?php echo $block->escapeHtml($id); ?>">
                    <?php echo $block->escapeHtml($referenceId); ?>
                </option>
            <?php endforeach; ?>
        </select>
    </div>
</div>
