Skip to content

Commit

Permalink
allow modal without footer
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed Sep 27, 2023
1 parent 5e8dddb commit 9554efc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions templates/embeds/modal.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% set _id = id ?? (block('modal_id') is defined ? block('modal_id') : ('modal-' ~ random())) %}
{% set _close = (close ?? true) is same as true %}
{% set _header = (header ?? true) is same as true %}
{% set _footer = (footer ?? true) is same as true %}
{% set _status = status ?? null %}

<div {% block modal_attributes %}{% endblock %} class="modal modal-blur fade {% block modal_class %}{% endblock %}" id="{{ _id }}" tabindex="-1" role="dialog"{% if _header %} aria-labelledby="{{ _id }}_label"{% endif %}>
Expand All @@ -17,9 +18,11 @@
<div {% block modal_body_attributes %}{% endblock %} class="modal-body {% block modal_body_class %}{% endblock %}">
{% block modal_body %}{% endblock %}
</div>
<div {% block modal_footer_attributes %}{% endblock %} class="modal-footer {% block modal_footer_class %}{% endblock %}">
{% block modal_footer %}{% endblock %}
</div>
{% if _footer %}
<div {% block modal_footer_attributes %}{% endblock %} class="modal-footer {% block modal_footer_class %}{% endblock %}">
{% block modal_footer %}{% endblock %}
</div>
{% endif %}
{% block modal_end %}{% endblock %}
</div>
</div>
Expand Down

0 comments on commit 9554efc

Please sign in to comment.