{% load i18n common %}
{% autoescape off %}
  <div id="{{ model_name }}_edit_form" style="padding: 10px">
    <form class="layui-form data-form" action="" method="post">
      {% csrf_token %}
      {% with form.form as f %}
        <div class="layui-tab">
          <ul class="layui-tab-title">
            <li class="layui-this">{% trans 'accTerminal_tab_accessControlOptions' %}</li>
            <li>{% trans 'accTerminal_tab_duressOptions' %}</li>
            <li>{% trans 'accTerminal_tab_anti-PassBackSetup' %}</li>
          </ul>
          <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
              <div class="layui-form-item" style="padding-top: 20px">
                {% layui_mid f.door_lock_delay %}
                {% layui_mid f.door_sensor_delay %}
              </div>
              <div class="layui-form-item">
                {% layui_mid f.door_sensor_type %}
                {% layui_mid f.door_alarm_delay %}
              </div>
              <div class="layui-form-item">
                {% layui_mid f.nc_time_period %}
                {% layui_mid f.no_time_period %}
              </div>
              <div class="layui-form-item">
                {% layui_inline f.retry_times %}
                {% layui_inline f.verify_mode_485 %}
              </div>
              <div class="layui-form-item">
                {% layui_switch f.valid_holiday %}
                {% layui_switch f.speaker_alarm %}
              </div>
            </div>
            <div class="layui-tab-item">
              <div class="layui-form-item" style="padding-top: 20px">
                {% layui_switch f.duress_fun_on %}
              </div>
              <div class="layui-form-item">
                {% layui_switch f.alarm_1_1 %}
                {% layui_switch f.alarm_1_n %}
              </div>
              <div class="layui-form-item">
                {% layui_switch f.alarm_password %}
                {% layui_mid f.duress_alarm_delay %}
              </div>
            </div>
            <div class="layui-tab-item">
              <div class="layui-form-item" style="padding-top: 20px">
                {% layui_inline f.anti_passback_mode %}
                {% layui_inline f.anti_door_direction %}
              </div>
            </div>
          </div>
        </div>
      {% endwith %}
    </form>
  </div>
  <script>
    $(function () {
      layui.use(['element', 'layer', 'laydate', 'form'], function () {
        var element = layui.element, laydate = layui.laydate, form = layui.form;
        element.render();
        form.render();
      });
    });
  </script>
{% endautoescape %}