<div class="m_headline">
  <fieldset>
    {% include 'm_components/form/input/text.twig' with {
      label : "title",
      value: title,
      title_text: __("Title", constant('M_TD')),
      class: "widefat"
    } %}
    {% include 'm_components/form/input/editor.twig' with { label: "text", value: text, title_text: __("Description", constant('M_TD')), class: "text-text" } %}
  </fieldset>
</div>

<div class="m_main">
  {# AUTO PANEL #}
  <section>

    <fieldset>
      <label for="{{ widget.get_field_id(order)|raw }}">{{ __( "Order" , constant('M_TD')) }}</label>
      {% include 'm_components/form/input/radio.twig' with {
        label : "order",
        array: order,
        value: "desc",
        title_text:  __("From oldest to newest", constant('M_TD')),
        class: "widefat"
      } %}
      {% include 'm_components/form/input/radio.twig' with {
        label : "order",
        array: order,
        value: "asc",
        title_text:  __("From newest to oldest", constant('M_TD')),
        class: "widefat"
      } %}
    </fieldset>

  </section>

  <section>
    <label for="{{ widget.get_field_id('selected')}}">{{__("Display options", constant('M_TD'))}}</label>

    {% include 'm_components/form/postType/tabs.twig' %}

    <div class="wp-tab-panel {% if (actual_tab == 'auto') or (actual_tab is empty) %} wp-tab-panel-active {% endif %}" id="auto">

      {% include 'm_components/form/postType/quantity.twig' with {
        post_type : __("users", constant('M_TD'))
      } %}

      {% include 'm_components/form/postType/taxonomy.twig' %}

      {# Auto PANEL #}
      <div>
        <label>{{ __( "Selection" , constant('M_TD')) }}</label>
        {% include 'm_components/form/input/radio.twig' with {
          label : "orderby",
          array: orderby,
          value: "latest",
          title_text: __( "Last registration", constant('M_TD')),
          class: "widefat"
        } %}
        {% include 'm_components/form/input/radio.twig' with {
          label : "orderby",
          array: orderby,
          value: "rand",
          title_text: __( "Random (Don't take the order into account anymore)", constant('M_TD')),
          class: "widefat"
        } %}
      </div>
    </div>

    {# MANUEL PANEL #}
    <div class="wp-tab-panel {% if actual_tab == 'manual' %} wp-tab-panel-active {% endif %}" id="manual">
      {% include 'm_components/form/postType/posts.twig' %}
    </div>

    <input type="hidden" class="actual_tab" name="{{ widget.get_field_name('actual_tab')|raw }}" value="{{actual_tab|raw}}">

  </section>

</div>
