Add support to change the submit icon and label in the generic confirm template.

This commit is contained in:
Roberto Rosario
2016-12-21 03:28:17 -04:00
parent c21eb6d4cf
commit 50a2a6c0f0

View File

@@ -44,7 +44,10 @@
<input name="previous" type="hidden" value="{{ previous }}" />
{% endif %}
<button type="submit" class="btn btn-danger" data-dismiss="modal">{% trans 'Yes' %}</button>
<button type="submit" class="btn btn-danger" data-dismiss="modal">
<i class="{{ submit_icon|default:'fa fa-check' }}"></i> {% if submit_label %}{{ submit_label }}{% else %}{% trans 'Yes' %}{% endif %}
</button>
{% if previous %}
<a class="btn btn-primary" onclick='{% if previous %}window.location.replace("{{ previous }}");{% else %}history.go(-1);{% endif %}'>{% trans 'No' %}</a>
{% endif %}