xowiki::bootstrap::modal_dialog (public)
xowiki::bootstrap::modal_dialog -id id -title title \ [ -subtitle subtitle ] -body body
Defined in packages/xowiki/tcl/bootstrap-procs.tcl
Generic modal dialog wrapper.
- Switches:
- -id (required)
- -title (required)
- HTML markup for the modal title (can contain tags)
- -subtitle (optional)
- HTML markup for the modal subtitle (can contain tags)
- -body (required)
- HTML markup for the modal body (can contain tags)
- Returns:
- HTML markup
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {$subtitle ne ""} { set subtitle [subst {<p class="modal-subtitle">$subtitle</p>}] } if {[::template::CSS toolkit] eq "bootstrap5"} { set data_attribute "data-bs" ::security::csp::require img-src data: set close_button_label "" set before_close "<h4 class='modal-title' id='configurationModalTitle'>$title</h4>" set after_close "" } else { set data_attribute "data" set close_button_label {<span aria-hidden="true">×</span>} set before_close "" set after_close "<h4 class='modal-title' id='configurationModalTitle'>$title</h4>" } return [ns_trim -delimiter | [subst { |<div class="modal fade" id="$id" tabindex="-1" role="dialog" | aria-labelledby="$id-label" aria-hidden="true"> | <div class="modal-dialog" role="document"> | <div class="modal-content"> | <div class="modal-header"> | $before_close<adp:button type="button" class="close" | data-dismiss="modal" aria-label="Close">$close_button_label | </adp:button>$after_close | </div> | <div class="modal-body">$subtitle | <form class="form-horizontal" id="configuration-form" role="form" action="#" method="post"> | $body | </form> | </div> | <div class="modal-footer"> | <adp:button type="button" class="btn btn-default" | data-dismiss="modal">#acs-kernel.common_Cancel# | </adp:button> | <adp:button id="$id-confirm" type="button" class="btn btn-primary confirm" | data-dismiss="modal">#acs-subsite.Confirm# | </adp:button> | </div> | </div> | </div> |</div> }]]XQL Not present: Generic, PostgreSQL, Oracle