<?php
/**
 * @var $block \PortalPeople\ShippingFields\Block\Adminhtml\Order\ShippingFields
 */
?>
<section class="admin__page-section order-shipping-fields-section">
    <div class="admin__page-section-title">
        <span class="title"><?= __('Shipping Fields') ?></span>
    </div>
    <div class="admin__page-section-content">
        <div class="admin__page-section-item order-shipping-fields">
            <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_w3w">
                            <?= __('What Three Words Location:') ?>
                        </label>
                        <div class="admin__field-control">
                            <input type="text"
                                   id="shipping_w3w"
                                   name="shipping_w3w"
                                   class="admin__control-text"
                                   value="<?= $block->escapeHtmlAttr($block->getShippingW3w()) ?>"/>
                        </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 save primary">
                                <span><?= __('Save Shipping Fields') ?></span>
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
