<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php if ($this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('main', $block->getQuote(), $block->getStoreId())): ?>
<?php $_items = $block->getItems(); ?>
<div id="order-giftmessage" class="giftmessage-order-create">
    <fieldset class="admin__fieldset">
        <legend class="admin__legend"><span><?= /* @escapeNotVerified */ __('Gift Message for the Entire Order') ?></span></legend>
        <br>
        <?php if ($this->helper('Magento\GiftMessage\Helper\Message')->isMessagesAllowed('main', $block->getQuote(), $block->getStoreId())): ?>
            <p><?= /* @escapeNotVerified */ __('Leave this box blank if you don\'t want to leave a gift message for the entire order.') ?></p>
            <?= $block->getFormHtml($block->getQuote(), 'main') ?>
        <?php endif; ?>
    </fieldset>
<script>
require(['Magento_Sales/order/create/form'], function(){

    order.giftmessageFieldsBind('order-giftmessage');
});
</script>
</div>
<?php endif; ?>
