2020-01-09 15:04:52 +00:00
|
|
|
{% macro render_field(field) %}
|
|
|
|
<div class="input-field">
|
|
|
|
<i class="prefix">{{ field.name[0:1]|upper }}</i>
|
|
|
|
{{ field.label }}
|
2020-01-10 10:29:26 +00:00
|
|
|
{{ field(data_length='255')|safe }}
|
2020-01-09 15:04:52 +00:00
|
|
|
</div>
|
|
|
|
{% if field.errors %}
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<span class="helper-text red-text">{{ error }}</span>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
{% macro render_field_with_value(field, corpus_file) %}
|
|
|
|
<div class="input-field">
|
|
|
|
<i class="prefix">{{ field.name[0:1]|upper }}</i>
|
|
|
|
{{ field.label }}
|
2020-01-10 10:29:26 +00:00
|
|
|
{{ field(value=corpus_file[field.name], data_length='255')| safe }}
|
2020-01-09 15:04:52 +00:00
|
|
|
</div>
|
|
|
|
{% if field.errors %}
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<span class="helper-text red-text">{{ error }}</span>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|