From 590f4aa46ddf0d20be42c458b4bb844644c2ed0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Sat, 8 Aug 2020 11:55:56 +0800 Subject: [PATCH] Added the non_field_errors to the templates of the accounting forms in the accounting application. --- .../templates/accounting/transactions/expense/form.html | 7 +++++++ .../templates/accounting/transactions/income/form.html | 7 +++++++ .../templates/accounting/transactions/transfer/form.html | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/accounting/templates/accounting/transactions/expense/form.html b/accounting/templates/accounting/transactions/expense/form.html index 77d8a97..c460a03 100644 --- a/accounting/templates/accounting/transactions/expense/form.html +++ b/accounting/templates/accounting/transactions/expense/form.html @@ -38,6 +38,13 @@ First written: 2020/7/23 {% include "accounting/include/summary-helper.html" %} +{% for message in item.non_field_errors %} +
+ + {{ _("Error:")|force_escape }} {{ message }} +
+{% endfor %} +
diff --git a/accounting/templates/accounting/transactions/income/form.html b/accounting/templates/accounting/transactions/income/form.html index 27458f8..e5f161a 100644 --- a/accounting/templates/accounting/transactions/income/form.html +++ b/accounting/templates/accounting/transactions/income/form.html @@ -38,6 +38,13 @@ First written: 2020/7/23 {% include "accounting/include/summary-helper.html" %} +{% for message in item.non_field_errors %} +
+ + {{ _("Error:")|force_escape }} {{ message }} +
+{% endfor %} +