{% load i18n %}
<div{% if modal.css_id %} id="{{ modal.css_id }}"{% endif %} tabindex="-1"
                        class="modal{% if modal.css_class %} {{ modal.css_class }}{% endif %}" {{ modal.flat_attrs }}>
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">{{ modal.title }}</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        {{ fields|safe }}
      </div>
      {% if buttons %}
        <div class="modal-footer">
          {{ button_field|safe }}
        </div>
      {% endif %}
    </div>
  </div>
</div>