Allow overriding base_form template controls
This commit is contained in:
parent
05bb3371a7
commit
04fc4b4a15
|
@ -16,6 +16,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<ul class="actions">
|
<ul class="actions">
|
||||||
|
{% block actions %}
|
||||||
{% if not is_popup %}
|
{% if not is_popup %}
|
||||||
<li><a href="{{ view.get_success_url }}">{% trans "Cancel" %}</a></li>
|
<li><a href="{{ view.get_success_url }}">{% trans "Cancel" %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
<li><button name="save_and_continue" type="submit">{% trans "Save and continue" %}</button>
|
<li><button name="save_and_continue" type="submit">{% trans "Save and continue" %}</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block extra_actions %}{% endblock %}
|
{% block extra_actions %}{% endblock %}
|
||||||
|
{% endblock actions %}
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -168,7 +168,7 @@ class GASUpdateView(GASMixin, UpdateView):
|
||||||
class GASDeleteView(GASMixin, DeleteView):
|
class GASDeleteView(GASMixin, DeleteView):
|
||||||
template_name = "gas/delete_confirmation.html"
|
template_name = "gas/delete_confirmation.html"
|
||||||
confirmation_text = _("Are your sure you want to delete {object}?")
|
confirmation_text = _("Are your sure you want to delete {object}?")
|
||||||
deleted_text = _("%(obj)s deleted.")
|
deleted_text = _("{object} deleted.")
|
||||||
|
|
||||||
def get_confirmation_text(self):
|
def get_confirmation_text(self):
|
||||||
return self.confirmation_text.format(object=self.object)
|
return self.confirmation_text.format(object=self.object)
|
||||||
|
|
Loading…
Reference in New Issue