<form class="row g-3" id="liste-filter"
      hx-get=""
      hx-params="*"
      hx-trigger="change"
      hx-push-url="true" 
      hx-swap="innerHTML" 
      hx-target="body">

  
    
  <div class="col-md-2">
    <label for="Hauptbetrieb" class="form-label">Hauptbetrieb</label>
    <select id="Hauptbetrieb" name="Hauptbetrieb" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Hauptbetrieb.items() %}
        {% if key == defaults.Hauptbetrieb %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
  </div>
  <div class="col-md-3">
    <label for="Standort" class="form-label">Standort</label>
    <select id="Standort" name="Standort" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Standort.items() %}
        {% if key == defaults.Standort %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
  </div>
  <div class="col-md-3">
    <label for="Bereich" class="form-label">Bereich</label>
    <select id="Bereich" name="Bereich" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Bereich.items() %}
        {% if key == defaults.Bereich %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}        
    </select>
  </div>
  <div class="col-md-4">
    <label for="Verursacher" class="form-label">Verursacher</label>
    <select id="Verursacher" name="Verursacher" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Verursacher.items() %}
        {% if key == defaults.Verursacher %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
  </div>


  <div class="col-md-3">
    <label for="Rechnungsnummer" class="form-label">Rechnungsnummer</label>
    <input type="text" class="form-control" id="Rechnungsnummer" name="Rechnungsnummer" value="{{ defaults.Rechnungsnummer }}">
  </div>
  <div class="col-md-2">
    <label for="RechnungsdatumVon" class="form-label">Rechnungsdatum von</label>
    <input type="date" class="form-control" id="RechnungsdatumVon" name="RechnungsdatumVon">
  </div>
  <div class="col-md-2">
    <label for="RechnungsdatumBis" class="form-label">Rechnungsdatum bis</label>
    <input type="date" class="form-control" id="RechnungsdatumBis" name="RechnungsdatumBis">
  </div>
  <div class="col-md-5">
    <label for="Kunde" class="form-label">Kunde</label>
    <select id="Kunde" name="Kunde" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Kunde.items() %}
        {% if key == defaults.Kunde %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
  </div>


  <div class="col-md-2">
    <label for="WiedervorlageVon" class="form-label">Wiedervorlage von</label>
    <input type="date" class="form-control" id="WiedervorlageVon" name="WiedervorlageVon">
  </div>
  <div class="col-md-2">
    <label for="WiedervorlageBis" class="form-label">Wiedervorlage bis</label>
    <input type="date" class="form-control" id="WiedervorlageBis" name="WiedervorlageBis">
  </div>

  <div class="col-md-4">
    <label for="Fahrzeug" class="form-label">Fahrzeug</label>
    <select id="Fahrzeug" name="Fahrzeug" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Fahrzeug.items() %}
        {% if key == defaults.Fahrzeug %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
  </div>
  <div class="col-md-2">
    <label for="Staffel" class="form-label">Staffel</label>
    <select id="Staffel" name="Staffel" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Staffel.items() %}
        {% if key == defaults.Staffel %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
  </div>
  <div class="col-md-2">
    <label for="Mahnstufe" class="form-label">Mahnstufe</label>
    <select id="Mahnstufe" name="Mahnstufe" class="form-select">
        <option value="">-</option>
      {% for key, value in filter.Mahnstufe.items() %}
        {% if key == defaults.Mahnstufe %}
        <option value="{{ key }}" selected>{{ value }}</option>
        {% else %}
        <option value="{{ key }}">{{ value }}</option>
        {% endif %}
      {% endfor %}
    </select>
  </div>
  <div class="col-12">
    <div class="form-check">
      <input class="form-check-input" type="checkbox" id="gridCheck">
      <label class="form-check-label" for="gridCheck">
        Guthaben anzeigen
      </label>
    </div>
  </div>
</form>