mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-12 09:58:50 -04:00
Refactor check table to use text fields
No need to repeat the same field-calling code each time. Think we didn’t do this before because there was no way of passing the `status` through to the `text_field` macro.
This commit is contained in:
@@ -205,20 +205,14 @@
|
||||
</span>
|
||||
{% endcall %}
|
||||
{% elif item['columns'][column].ignore %}
|
||||
{% call field(status='default') %}
|
||||
{{ item['columns'][column].data if item['columns'][column].data != None }}
|
||||
{% endcall %}
|
||||
{{ text_field(item['columns'][column].data or '', status='default') }}
|
||||
{% else %}
|
||||
{% call field() %}
|
||||
{{ item['columns'][column].data if item['columns'][column].data != None }}
|
||||
{% endcall %}
|
||||
{{ text_field(item['columns'][column].data or '') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if item['columns'].get(None) %}
|
||||
{% for column in item['columns'][None].data %}
|
||||
{% call field(status='default') %}
|
||||
{{ column }}
|
||||
{% endcall %}
|
||||
{{ text_field(column, status='default') }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
|
||||
Reference in New Issue
Block a user