mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-27 03:44:19 +00:00
32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
|
{% macro render_field(field) %}
|
||
|
<div class="input-field">
|
||
|
<i class="prefix">{{ field.name[0:1]|upper }}</i>
|
||
|
{{ field.label }}
|
||
|
{{ field(data_length='255')|safe }}
|
||
|
</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 }}
|
||
|
{{ field(value=corpus_file[field.name], data_length='255')| safe }}
|
||
|
</div>
|
||
|
{% if field.errors %}
|
||
|
{% for error in field.errors %}
|
||
|
<span class="helper-text red-text">{{ error }}</span>
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
{% endmacro %}
|
||
|
|
||
|
|
||
|
{% macro submit_button(input) %}
|
||
|
<button class="btn waves-effect waves-light" id="{{ input.id }}" name="{{ input.name }}" type="submit" value="{{ input.label.text }}">{{ input.label.text }}<i class="material-icons right">send</i></button>
|
||
|
{% endmacro %}
|