From cf154c46f4290c9043579b1df78b0d3e4219e00d Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sun, 10 Nov 2019 03:34:07 -0400 Subject: [PATCH] Update form subtemplate button Will show "Submit" for forms without an instance and "Save" for forms with an instance. Should be better than the older behavior of just testing for a template object. Signed-off-by: Roberto Rosario --- .../templates/appearance/generic_form_subtemplate.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mayan/apps/appearance/templates/appearance/generic_form_subtemplate.html b/mayan/apps/appearance/templates/appearance/generic_form_subtemplate.html index 21bdc64815..50a9a90699 100644 --- a/mayan/apps/appearance/templates/appearance/generic_form_subtemplate.html +++ b/mayan/apps/appearance/templates/appearance/generic_form_subtemplate.html @@ -10,11 +10,10 @@
{% if form.is_multipart %} -
+ {% else %} - + {% endif %} - {{ wizard.management_form }} {% if step_field %} @@ -83,7 +82,7 @@ {% else %} {% endif %} - {% if submit_label %}{{ submit_label }}{% else %}{% if object %}{% trans 'Save' %}{% else %}{% trans 'Submit' %}{% endif %}{% endif %} + {% if submit_label %}{{ submit_label }}{% else %}{% if form.instance %}{% trans 'Save' %}{% else %}{% trans 'Submit' %}{% endif %}{% endif %} {% if previous %}