{#**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 *#}

{% import '@PrestaShop/Admin/macros.html.twig' as ps %}

{% block order_state_form %}
  {{ form_start(orderStateForm) }}
    <div class="card">
      <h3 class="card-header">
        <i class="material-icons">schedule</i>
        {{ 'Order status'|trans({}, 'Admin.Shopparameters.Feature') }}
      </h3>
      <div class="card-body">
        <div class="form-wrapper">
          {{ form_errors(orderStateForm) }}

          {{ ps.form_group_row(orderStateForm.name, {}, {
            'label': 'Status name'|trans({}, 'Admin.Shopparameters.Feature'),
            'help': 'Order status (e.g. \'Pending\').'|trans({}, 'Admin.Shopparameters.Help')
                    ~ ' '
                    ~ 'Invalid characters: numbers and'|trans({}, 'Admin.Shopparameters.Help')
                    ~ ' !<>,;?=+()@#"{}_$%:'
          }) }}

          {{ ps.form_group_row(orderStateForm.color, {}, {
            'label': 'Color'|trans({}, 'Admin.Shopparameters.Feature'),
            'help': 'Status will be highlighted in this color. HTML colors only.'|trans({}, 'Admin.Shopparameters.Help') ~ ' "lightblue", "#CC6600")'
          }) }}

          {{ ps.form_group_row(orderStateForm.loggable, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.invoice, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.hidden, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.send_email, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.pdf_invoice, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.pdf_delivery, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.shipped, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.paid, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.delivery, {}, {'label': ''}) }}

          {{ ps.form_group_row(orderStateForm.template, {
              'options_extra': {
                'data-preview': templatesPreviewUrl
              },
              'button': {
                'label': 'Preview'|trans({}, 'Admin.Actions'),
                'icon': 'visibility',
                'class': 'btn btn-primary',
                'id': 'order_state_template_preview'
              }
            },
            {
              'label': 'Email template'|trans({}, 'Admin.Shopparameters.Feature'),
              'hint': 'Status will be highlighted in this color. HTML colors only.'|trans({}, 'Admin.Shopparameters.Help') ~ ' "lightblue", "#CC6600")',
              'class': 'order_state_template_select'
            }) }}

          {% block order_state_form_reset %}
            {{ form_rest(orderStateForm) }}
          {% endblock %}
        </div>
      </div>
      <div class="card-footer">
          <a href="{{ pathWithBackUrl('admin_order_states') }}" class="btn btn-outline-secondary">
          {{ 'Cancel'|trans({}, 'Admin.Actions') }}
        </a>
        <button class="btn btn-primary float-right">
          {{ 'Save'|trans({}, 'Admin.Actions') }}
        </button>
      </div>
    </div>
  {{ form_end(orderStateForm) }}
{% endblock %}
