File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
djangocms_frontend/contrib/modal
templates/djangocms_frontend/bootstrap5 Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 33
44from ... import settings
55from ...cms_plugins import CMSUIPlugin
6- from ...common . attributes import AttributesMixin
6+ from ...common import AttributesMixin
77from .. import modal
88from . import forms , models
99
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ class Meta:
8989 "attributes" ,
9090 "modal_centered" ,
9191 "modal_static" ,
92+ "modal_footer" ,
9293 "modal_scrollable" ,
9394 "modal_size" ,
9495 "modal_fullscreen" ,
@@ -114,6 +115,12 @@ class Meta:
114115 help_text = _ ("If selected, the modal will not close when clicking outside of it." ),
115116 )
116117
118+ modal_footer = forms .BooleanField (
119+ label = _ ("Footer" ),
120+ required = False ,
121+ help_text = _ ("If selected, the modal will display a footer with a close button." ),
122+ )
123+
117124 modal_scrollable = forms .BooleanField (
118125 label = _ ("Scrollable" ),
119126 required = False ,
Original file line number Diff line number Diff line change 66 {% for plugin in instance.child_plugin_instances %}
77 {% with forloop as parentloop %}{% render_plugin plugin %}{% endwith %}
88 {% endfor %}
9+ {% if instance.modal_footer %}
910 < div class ="modal-footer ">
1011 < button type ="button " class ="btn btn-secondary " data-bs-dismiss ="modal "> Close</ button >
1112 </ div >
13+ {% endif %}
1214 </ div >
1315 </ div >
1416 </ div >
You can’t perform that action at this time.
0 commit comments