{% load i18n %} {% if form.errors %}
<!-- form errors  -->
<div class="oh-wrapper">
  <div class="oh-alert-container">
    {% for error in form.non_field_errors %}
    <div class="oh-alert oh-alert--animated oh-alert--danger">{{ error }}</div>
    {% endfor %}
  </div>
</div>
{% endif %}

<form hx-post="{% url 'user-request' id %}" hx-encoding="multipart/form-data">
  <div class="oh-modal__dialog-body pb-2">
    <label class="oh-label d-block">{% trans "Start Date" %}</label>
    {{form.start_date}} {{form.start_date.errors}}
  </div>
  <div class="oh-modal__dialog-body pb-2" id="startDate">
    <label class="oh-label d-block">{% trans "Start Date Breakdown" %}</label>
    {{form.start_date_breakdown}}
  </div>
  <div class="oh-modal__dialog-body pb-2">
    <label class="oh-label d-block">{% trans "End Date" %}</label>
    {{form.end_date}} {{form.end_date.errors}}
  </div>
  <div class="oh-modal__dialog-body pb-2" id="endDate">
    <label class="oh-label d-block">{% trans "End Date Breakdown" %}</label>
    {{form.end_date_breakdown}}
  </div>
  <div class="oh-modal__dialog-body pb-2">
    <label class="oh-label d-block">{% trans "Description" %}</label>
    {{form.description}}
  </div>
  {% if leave_type.require_attachment == "yes" %}
  <div class="oh-modal__dialog-body pb-2">
    <label class="oh-label d-block">{% trans "Attachment" %}</label>
    {{form.attachment}} {{form.attachment.errors}}
  </div>
  {% endif %}
  <div class="oh-modal__dialog-footer">
    <button type="submit" class="oh-btn oh-btn--secondary w-100">
      {% trans "Apply" %}
    </button>
  </div>
</form>
