{% load i18n %}
<div class="oh-modal__dialog-header pb-0">
  <h2 class="oh-modal__dialog-title" id="editModal1ModalLabel">
    {% if r_type.id %}
      {% trans "Update Rotating Work Type" %}
    {% else %}
      {% trans "Create Rotating Work Type" %}
    {% endif %}
  </h2>
  <button class="oh-modal__close" aria-label="Close">
    <ion-icon name="close-outline"></ion-icon>
  </button>
</div>
<div class="oh-modal__dialog-body">
  <form
    {% if r_type.id %}
        hx-post="{% url 'rotating-work-type-update' r_type.id %}"
        hx-target="#objectUpdateModalTarget"
    {% else %}
        hx-post="{% url 'rotating-work-type-create' %}"
        hx-target="#objectCreateModalTarget"
    {% endif %}
    class="oh-profile-section"
  >
    {% csrf_token %} {{form.as_p}}
    <div class="oh-modal__dialog-footer p-0 mt-3">
      <button type="submit" class="oh-btn oh-btn--secondary oh-btn--shadow">
        {% trans "Save" %}
      </button>
    </div>
  </form>
</div>
