{{define "type:field_new"}}
<div
  class="w3-card"
  id="field-new-{{.counter}}"
  style="padding: 10px; margin-top: 10px"
>
  <div class="w3-row">
    <div class="w3-half">
      {{ widget_select (print "Fields-New-" .counter "-Widget_id") "Widget" "" .widgets `class="w3-input w3-border"` }}
    </div>
    <div class="w3-half">
      <label for="Fields-New-{{.counter}}-Title">Title</label>
      <input
        class="w3-input w3-border"
        type="text"
        id="Fields-New-{{.counter}}-Title"
        name="Fields-New-{{.counter}}-Title"
        value=""
      />
    </div>
  </div>

  <div class="w3-row">
    <div class="w3-half">
      <label for="Fields-New-{{.counter}}-Attributes">Attributes</label>
      <input
        class="w3-input w3-border"
        type="text"
        id="Fields-New-{{.counter}}-Attributes"
        name="Fields-New-{{.counter}}-Attributes"
        value=""
      />
    </div>
    <div class="w3-half">
      <label for="Fields-New-{{.counter}}-Valid_values">Valid values</label>
      <input
        class="w3-input w3-border"
        type="text"
        id="Fields-New-{{.counter}}-Valid_values"
        name="Fields-New-{{.counter}}-Valid_values"
        value=""
      />
    </div>
  </div>
  <div class="w3-row">
    <div class="w3-half">
  <p>
    <input
      id="Fields-New-{{.counter}}-Show_on_list"
      name="Fields-New-{{.counter}}-Show_on_list"
      class="w3-check"
      type="checkbox"
      value="1"
    />
    <label for="Fields-New-{{.counter}}-Show_on_list">Show on list</label>
  </p>
  <p>
    <input
      id="Fields-New-{{.counter}}-Show_on_view"
      name="Fields-New-{{.counter}}-Show_on_view"
      class="w3-check"
      type="checkbox"
      value="1"
    />
    <label for="Fields-New-{{.counter}}-Show_on_view">Show on view</label>
  </p>
  <p>
    <input
      id="Fields-New-{{.counter}}-Is_multiple"
      name="Fields-New-{{.counter}}-Is_multiple"
      class="w3-check"
      type="checkbox"
      value="1"
    />
    <label for="Fields-New-{{.counter}}-Is_multiple">Multiple</label>
  </p>
  </div>
  <div class="w3-half">
    {{ widget_select (print "Fields-"  .Type_field_id "-Ui_section") "Section" "general" $.uisections `class="w3-input w3-border"` }}
  </div>
  </div>
  <div class="w3-bar">
    <button
      type="button"
      _="on click remove #field-new-{{.counter}}"
      class="w3-right w3-btn w3-metro-dark-red w3-round-large"
    >
      <i class="bi bi-file-minus" title="Remove"></i><span class="hide-small"> Remove</span>
    </button>
  </div>
</div>
{{ end }}
