diff --git a/djangocms_frontend/contrib/modal/cms_plugins.py b/djangocms_frontend/contrib/modal/cms_plugins.py index 59b969cd..7de6b0dd 100644 --- a/djangocms_frontend/contrib/modal/cms_plugins.py +++ b/djangocms_frontend/contrib/modal/cms_plugins.py @@ -3,7 +3,7 @@ from ... import settings from ...cms_plugins import CMSUIPlugin -from ...common.attributes import AttributesMixin +from ...common import AttributesMixin from .. import modal from . import forms, models diff --git a/djangocms_frontend/contrib/modal/forms.py b/djangocms_frontend/contrib/modal/forms.py index f19ce3c9..d91fb46a 100644 --- a/djangocms_frontend/contrib/modal/forms.py +++ b/djangocms_frontend/contrib/modal/forms.py @@ -89,6 +89,7 @@ class Meta: "attributes", "modal_centered", "modal_static", + "modal_footer", "modal_scrollable", "modal_size", "modal_fullscreen", @@ -114,6 +115,12 @@ class Meta: help_text=_("If selected, the modal will not close when clicking outside of it."), ) + modal_footer = forms.BooleanField( + label=_("Footer"), + required=False, + help_text=_("If selected, the modal will display a footer with a close button."), + ) + modal_scrollable = forms.BooleanField( label=_("Scrollable"), required=False, diff --git a/djangocms_frontend/contrib/modal/templates/djangocms_frontend/bootstrap5/modal-container.html b/djangocms_frontend/contrib/modal/templates/djangocms_frontend/bootstrap5/modal-container.html index 1a501841..bd54e211 100644 --- a/djangocms_frontend/contrib/modal/templates/djangocms_frontend/bootstrap5/modal-container.html +++ b/djangocms_frontend/contrib/modal/templates/djangocms_frontend/bootstrap5/modal-container.html @@ -6,9 +6,11 @@ {% for plugin in instance.child_plugin_instances %} {% with forloop as parentloop %}{% render_plugin plugin %}{% endwith %} {% endfor %} + {% if instance.modal_footer %} + {% endif %}