Factorized creation and confirmation modal dialogs
This commit is contained in:
43
templates/admin/default/includes/generic-confirm-dialog.html
Normal file
43
templates/admin/default/includes/generic-confirm-dialog.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{*
|
||||
|
||||
A generic modal confirmation dialog template.
|
||||
|
||||
Parameters:
|
||||
|
||||
dialog_id = the dialog id attribute
|
||||
dialog_title = the dialog title
|
||||
dialog_message = the dialog confirmation message
|
||||
|
||||
dialog_ok_label = The OK button label (default: yes)
|
||||
dialog_cancel_label = The Cancel button label (default: no)
|
||||
|
||||
form_action = the form action URL, subtitted by a click on OK button
|
||||
form_method = the form method, default "POST"
|
||||
form_content = the form content
|
||||
|
||||
*}
|
||||
<div class="modal fade" id="{$dialog_id}" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>{$dialog_title}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{$dialog_message nofilter}
|
||||
</div>
|
||||
|
||||
<form method="{$form_method|default:POST}" action="{$form_action}">
|
||||
|
||||
{$form_content nofilter}
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span> {$dialog_cancel_label|default:{intl l="No"}}</button>
|
||||
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {$dialog_ok_label|default:{intl l="Yes"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user