Revised the record form template to display the whole-record errors.
This commit is contained in:
parent
5833af83a9
commit
1f0ec979ae
@ -20,7 +20,9 @@ Author: imacat@mail.imacat.idv.tw (imacat)
|
||||
First written: 2020/8/5
|
||||
{% endcomment %}
|
||||
|
||||
<li id="{{ record_type }}-{{ no }}" class="list-group-item d-flex justify-content-between draggable-record {{ record_type }}-record" data-no="{{ no }}">
|
||||
<li id="{{ record_type }}-{{ no }}" class="list-group-item {% if should_validate and record.non_field_errors %} list-group-item-danger {% endif %} draggable-record {{ record_type }}-record" data-no="{{ no }}">
|
||||
<div id="{{ record_type }}-{{ no }}-error">{% if should_validate and record.non_field_errors %}{{ record.non_field_errors.0 }}{% endif %}</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
{% if record.id.value %}
|
||||
@ -68,4 +70,5 @@ First written: 2020/8/5
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -20,7 +20,9 @@ Author: imacat@mail.imacat.idv.tw (imacat)
|
||||
First written: 2020/8/5
|
||||
{% endcomment %}
|
||||
|
||||
<li id="{{ record_type }}-{{ no }}" class="list-group-item d-flex draggable-record {{ record_type }}-record" data-no="{{ no }}">
|
||||
<li id="{{ record_type }}-{{ no }}" class="list-group-item {% if should_validate and record.non_field_errors %} list-group-item-danger {% endif %} draggable-record {{ record_type }}-record" data-no="{{ no }}">
|
||||
<div id="{{ record_type }}-{{ no }}-error">{% if should_validate and record.non_field_errors %}{{ record.non_field_errors.0 }}{% endif %}</div>
|
||||
<div class="d-flex">
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@ -60,4 +62,5 @@ First written: 2020/8/5
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user