Allow overriding base_form template controls

This commit is contained in:
Ales (Shagi) Zabala Alava 2020-12-23 19:04:31 +01:00
parent 05bb3371a7
commit 04fc4b4a15
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@
{% endblock %}
<ul class="actions">
{% block actions %}
{% if not is_popup %}
<li><a href="{{ view.get_success_url }}">{% trans "Cancel" %}</a></li>
{% endif %}
@ -26,6 +27,7 @@
<li><button name="save_and_continue" type="submit">{% trans "Save and continue" %}</button>
{% endif %}
{% block extra_actions %}{% endblock %}
{% endblock actions %}
</ul>
</form>
{% endblock %}

View File

@ -168,7 +168,7 @@ class GASUpdateView(GASMixin, UpdateView):
class GASDeleteView(GASMixin, DeleteView):
template_name = "gas/delete_confirmation.html"
confirmation_text = _("Are your sure you want to delete {object}?")
deleted_text = _("%(obj)s deleted.")
deleted_text = _("{object} deleted.")
def get_confirmation_text(self):
return self.confirmation_text.format(object=self.object)