2020-02-24 08:27:02 +00:00
|
|
|
{% macro render_field(field) %}
|
2020-04-16 11:47:52 +00:00
|
|
|
<div class="input-field">
|
|
|
|
<i class="prefix">{{ field.label.text[0:1]|upper }}</i>
|
|
|
|
{{ field.label }}
|
|
|
|
{{ field(data_length='255')|safe }}
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<span class="helper-text red-text">{{ error }}</span>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-02-24 08:27:02 +00:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro render_field_with_value(field, corpus_file) %}
|
2020-04-16 11:47:52 +00:00
|
|
|
<div class="input-field">
|
|
|
|
<i class="prefix">{{ field.label.text[0:1]|upper }}</i>
|
|
|
|
{{ field.label }}
|
|
|
|
{{ field(value=corpus_file[field.name], data_length='255')| safe }}
|
|
|
|
{% for error in field.errors %}
|
|
|
|
<span class="helper-text red-text">{{ error }}</span>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2020-02-24 08:27:02 +00:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
{% macro submit_button(input) %}
|
2020-04-16 11:47:52 +00:00
|
|
|
<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>
|
2020-02-24 08:27:02 +00:00
|
|
|
{% endmacro %}
|