{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="float-end">
        <button type="submit" form="form-customer-group" data-bs-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa-solid fa-floppy-disk"></i></button>
        <a href="{{ back }}" data-bs-toggle="tooltip" title="{{ button_back }}" class="btn btn-light"><i class="fa-solid fa-reply"></i></a></div>
      <h1>{{ heading_title }}</h1>
      <ol class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
          <li class="breadcrumb-item"><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ol>
    </div>
  </div>
  <div class="container-fluid">
    <div class="card">
      <div class="card-header"><i class="fa-solid fa-pencil"></i> {{ text_form }}</div>
      <div class="card-body">
        <form id="form-customer-group" action="{{ save }}" method="post" data-oc-toggle="ajax">
          <div class="row mb-3 required">
            <label class="col-sm-2 col-form-label">{{ entry_name }}</label>
            <div class="col-sm-10">
              {% for language in languages %}
                <div class="input-group">
                  <div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
                  <input type="text" name="customer_group_description[{{ language.language_id }}][name]" value="{{ customer_group_description[language.language_id] ? customer_group_description[language.language_id].name }}" placeholder="{{ entry_name }}" id="input-name-{{ language.language_id }}" class="form-control"/>
                  <div id="error-name-{{ language.language_id }}" class="invalid-feedback"></div>
                </div>
              {% endfor %}
            </div>
          </div>
          {% for language in languages %}
            <div class="row mb-3">
              <label for="input-description-{{ language.language_id }}" class="col-sm-2 col-form-label">{{ entry_description }}</label>
              <div class="col-sm-10">
                <div class="input-group">
                  <div class="input-group-text"><img src="{{ language.image }}" title="{{ language.name }}"/></div>
                  <textarea name="customer_group_description[{{ language.language_id }}][description]" rows="5" placeholder="{{ entry_description }}" id="input-description-{{ language.language_id }}" class="form-control">{{ customer_group_description[language.language_id] ? customer_group_description[language.language_id].description }}</textarea>
                </div>
              </div>
            </div>
          {% endfor %}
          <div class="row mb-3">
            <label class="col-sm-2 col-form-label">{{ entry_approval }}</label>
            <div class="col-sm-10">
              <div class="form-check form-switch form-switch-lg">
                <input type="hidden" name="approval" value="0"/>
                <input type="checkbox" name="approval" value="1" id="input-approval" class="form-check-input"{% if approval %} checked{% endif %}/>
              </div>
              <div class="form-text">{{ help_approval }}</div>
            </div>
          </div>
          <div class="row mb-3">
            <label for="input-sort-order" class="col-sm-2 col-form-label">{{ entry_sort_order }}</label>
            <div class="col-sm-10">
              <input type="text" name="sort_order" value="{{ sort_order }}" placeholder="{{ entry_sort_order }}" id="input-sort-order" class="form-control"/>
            </div>
          </div>
          <input type="hidden" name="customer_group_id" value="{{ customer_group_id }}" id="input-customer-group-id"/>
        </form>
      </div>
    </div>
  </div>
</div>
{{ footer }}
