Set characters according to metadata label

This commit is contained in:
Patrick Jentsch 2020-04-16 13:47:52 +02:00
parent 72e585395b
commit 6177093a51

View File

@ -1,31 +1,30 @@
{% macro render_field(field) %} {% macro render_field(field) %}
<div class="input-field"> <div class="input-field">
<i class="prefix">{{ field.name[0:1]|upper }}</i> <i class="prefix">{{ field.label.text[0:1]|upper }}</i>
{{ field.label }} {{ field.label }}
{{ field(data_length='255')|safe }} {{ field(data_length='255')|safe }}
</div> {% for error in field.errors %}
{% if field.errors %} <span class="helper-text red-text">{{ error }}</span>
{% for error in field.errors %} {% endfor %}
<span class="helper-text red-text">{{ error }}</span> </div>
{% endfor %}
{% endif %}
{% endmacro %} {% endmacro %}
{% macro render_field_with_value(field, corpus_file) %} {% macro render_field_with_value(field, corpus_file) %}
<div class="input-field"> <div class="input-field">
<i class="prefix">{{ field.name[0:1]|upper }}</i> <i class="prefix">{{ field.label.text[0:1]|upper }}</i>
{{ field.label }} {{ field.label }}
{{ field(value=corpus_file[field.name], data_length='255')| safe }} {{ field(value=corpus_file[field.name], data_length='255')| safe }}
</div> {% for error in field.errors %}
{% if field.errors %} <span class="helper-text red-text">{{ error }}</span>
{% for error in field.errors %} {% endfor %}
<span class="helper-text red-text">{{ error }}</span> </div>
{% endfor %}
{% endif %}
{% endmacro %} {% endmacro %}
{% macro submit_button(input) %} {% 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> <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 %} {% endmacro %}