{{ template "header" . }}
<h2>Setup</h2>
<form action="/setup" method="post">
  <h3>Radareinstellungen</h3>
  <fieldset>
    <label>
      Höhe
      <fieldset role="group">
        <input
          name="radar_height"
          placeholder="100"
          value="{{ .Config.RadarHeight }}"
          type="number"
          min="40"
          max="3000"
        />
        <div role="button" class="form-append secondary">cm</div>
      </fieldset>
    </label>
    <label>
      Vertikaler Winkel
      <fieldset role="group">
        <input
          name="radar_angle"
          placeholder="0"
          value="{{ .Config.RadarAngle }}"
          type="number"
          min="0"
          max="90"
        />
        <div role="button" class="form-append secondary">°</div>
      </fieldset>
    </label>
    <label>
      Minimale Distanz
      <fieldset role="group">
        <input
          name="radar_min_distance"
          placeholder="0"
          value="{{ .Config.RadarMinDistance }}"
          type="number"
          min="0"
          max="125"
        />
        <div role="button" class="form-append secondary">m</div>
      </fieldset>
    </label>
    <label>
      Maximale Distanz
      <fieldset role="group">
        <input
          name="radar_max_distance"
          placeholder="0"
          value="{{ .Config.RadarMaxDistance }}"
          type="number"
          min="0"
          max="125"
        />
        <div role="button" class="form-append secondary">m</div>
      </fieldset>
    </label>
    <label>
      Speed detection minimum
      <fieldset role="group">
        <input
          name="radar_min_speed"
          placeholder="0"
          value="{{ .Config.RadarMinSpeed }}"
          type="number"
          min="0"
          max="240"
        />
        <div role="button" class="form-append secondary">km/h</div>
      </fieldset>
    </label>
    <label>
      Speed detection maximum
      <fieldset role="group">
        <input
          name="radar_max_speed"
          placeholder="0"
          value="{{ .Config.RadarMaxSpeed }}"
          type="number"
          min="0"
          max="240"
        />
        <div role="button" class="form-append secondary">km/h</div>
      </fieldset>
    </label>
    <label>
      <input
        name="radar_waveform"
        type="checkbox"
        role="switch"
        value="true"
        {{ if .Config.RadarWaveform }}
        checked="checked"
        {{ end }}
      />
      Waveform Config (unterscheidet zwei nebeneinander liegende Radarsensoren)
    </label>
  </fieldset>
  <h3>Blitzereinstellungen</h3>
  <fieldset>
    <label>
      Auslöse Entfernung
      <fieldset role="group">
        <input
          name="trigger_distance"
          placeholder="100"
          value="{{ .Config.TriggerDistance }}"
          type="number"
          min="0"
          max="125"
        />
        <div role="button" class="form-append secondary">m</div>
      </fieldset>
    </label>
    <label>
      Auslöse Geschwindigkeit
      <fieldset role="group">
        <input
          name="trigger_speed"
          placeholder="100"
          value="{{ .Config.TriggerSpeed }}"
          type="number"
          min="0"
          max="240"
        />
        <div role="button" class="form-append secondary">km/h</div>
      </fieldset>
    </label>
  </fieldset>
  <input type="submit" value="Speichern" />
</form>
{{ template "footer" . }}
