<?php
/**
 * @var $block \PortalPeople\ShippingFields\Block\Adminhtml\Order\ShippingFields
 */
?>
<div class="admin__page-section-item order-shipping-fields">
    <div class="admin__page-section-item-title">
        <span class="title"><?= __('Shipping Fields') ?></span>
    </div>
    <div class="admin__page-section-item-content">
        <form action="<?= $block->escapeUrl($block->getUpdateUrl()) ?>" method="post">
            <?= $block->getBlockHtml('formkey') ?>

            <div class="admin__field">
                <label class="admin__field-label" for="shipping_date">
                    <?= __('Preferred Shipping Date') ?>
                </label>
                <div class="admin__field-control">
                    <input type="date"
                           id="shipping_date"
                           name="shipping_date"
                           class="admin__control-text"
                           value="<?= $block->escapeHtmlAttr($block->getRawShippingDate()) ?>"/>
                </div>
            </div>

            <div class="admin__field">
                <label class="admin__field-label" for="shipping_message">
                    <?= __('Delivery Message') ?>
                </label>
                <div class="admin__field-control">
                    <textarea id="shipping_message"
                              name="shipping_message"
                              class="admin__control-textarea"
                              rows="3"><?= $block->escapeHtml($block->getShippingMessage()) ?></textarea>
                </div>
            </div>

            <div class="admin__field">
                <div class="admin__field-control">
                    <button type="submit" class="action-default scalable">
                        <span><?= __('Save Shipping Fields') ?></span>
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
