{% from 'message_box.html' import message_box %} {% macro confirmation_checkbox() %} {% endmacro %} {% macro confirmation_dialog(type, content=none, message=none, extra_confirmation=true, ok_text=none, cancel_text=none, id_field_name='id', ids=[], extra_inputs=[]) %} {# type can be any of the usual message_box types like 'warning', 'danger', 'info', 'highlight',... #}
{{ content or caller() }}
{% if message %} {% call message_box(type=type, large_icon=true, footer=confirmation_checkbox() if extra_confirmation else none) %} {{ message }} {% endcall %} {% elif extra_confirmation %} {{ confirmation_checkbox() }} {% endif %} {% for id in ids %} {% endfor %} {% for input in extra_inputs %} {% endfor %}
{% endmacro %}