{% load i18n static common %}
<style>
    #id_manual_logs dl {
        max-height: 100px;
    }
</style>
<div id='id_manual_logs' style="padding: 5px;height: 505px;width: 1100px;overflow: hidden;">
  <form class="layui-form action-form" action="" method="post" id="{{ model_name }}_{{ action_repr }}">
    {% csrf_token %}
    {% with form.form as f %}
      <div style="padding-bottom: 5px">{{ f.emp }}</div>
        <div style="max-height: 140px;" >

      <div class="layui_form_item">
        {% layui_inline f.punch_time %}
        {% layui_inline f.punch_state %}
        {% layui_inline f.work_code %}
      </div>
      <div class="layui_form_item">
        {% layui_inline f.reason %}
      </div>
        </div>
    {% endwith %}
  </form>
</div>
<script>
  layui.use(['form', 'laydate'], function () {
 // if ($(window).height()<600) $('#id_manual_logs').height($(window).height()-100)
    var form = layui.form;
    var laydate = layui.laydate;
    $("form.layui-form input.layui-datetime").each(function () {
      laydate.render({elem: this, type: 'datetime'});
    });
    $("form.layui-form input.layui-date").each(function () {
      laydate.render({elem: this, type: 'date'});
    });
    $("form.layui-form input.layui-time").each(function () {
      laydate.render({elem: this, type: 'time'});
    });
    {% block form_verify %}
      form.verify({});
    {% endblock %}
    form.render();

  });
</script>
