From 1f0ec979ae2b9dfc42fe65c9712d5950ae1b78e3 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:08:56 +0800 Subject: [PATCH] Revised the record form template to display the whole-record errors. --- .../include/form-record-non-transfer.html | 87 ++++++++++--------- .../include/form-record-transfer.html | 71 +++++++-------- 2 files changed, 82 insertions(+), 76 deletions(-) diff --git a/accounting/templates/accounting/include/form-record-non-transfer.html b/accounting/templates/accounting/include/form-record-non-transfer.html index 645b19d..27997e7 100644 --- a/accounting/templates/accounting/include/form-record-non-transfer.html +++ b/accounting/templates/accounting/include/form-record-non-transfer.html @@ -20,52 +20,55 @@ Author: imacat@mail.imacat.idv.tw (imacat) First written: 2020/8/5 {% endcomment %} -
  • -
    -
    - {% if record.id.value %} - - {% endif %} - - {% endif %} - - -
    {% if should_validate %}{{ record.account.errors.0|default:"" }}{% endif %}
    -
    -
    -
    -
    - -
    {% if should_validate %}{{ record.summary.errors.0|default:"" }}{% endif %}
    -
    -
    - -
    {% if should_validate %}{{ record.amount.errors.0|default:"" }}{% endif %}
    + + +
    {% if should_validate %}{{ record.account.errors.0|default:"" }}{% endif %}
    +
    +
    +
    +
    + +
    {% if should_validate %}{{ record.summary.errors.0|default:"" }}{% endif %}
    +
    +
    + +
    {% if should_validate %}{{ record.amount.errors.0|default:"" }}{% endif %}
    +
    -
    -
    -
    - - -
    -
    - - +
    +
    + + +
    +
    + + +
  • diff --git a/accounting/templates/accounting/include/form-record-transfer.html b/accounting/templates/accounting/include/form-record-transfer.html index fa8c4ca..083e3b1 100644 --- a/accounting/templates/accounting/include/form-record-transfer.html +++ b/accounting/templates/accounting/include/form-record-transfer.html @@ -20,44 +20,47 @@ Author: imacat@mail.imacat.idv.tw (imacat) First written: 2020/8/5 {% endcomment %} -
  • -
    -
    -
    - {% if record.id.value %} - - {% endif %} - - {% endif %} - - -
    {% if should_validate %}{{ record.account.errors.0|default:"" }}{% endif %}
    + + +
    {% if should_validate %}{{ record.account.errors.0|default:"" }}{% endif %}
    +
    +
    +
    +
    + +
    {% if should_validate %}{{ record.summary.errors.0|default:"" }}{% endif %}
    +
    +
    + +
    {% if should_validate %}{{ record.amount.errors.0|default:"" }}{% endif %}
    +
    -
    -
    - -
    {% if should_validate %}{{ record.summary.errors.0|default:"" }}{% endif %}
    +
    +
    + +
    -
    - -
    {% if should_validate %}{{ record.amount.errors.0|default:"" }}{% endif %}
    -
    -
    -
    -
    -
    - -