{% extends "base.html" %} {% block title %} {{ item.name }} {% endblock %} {% block content %}
{% with messages = get_flashed_messages(with_categories=true) %} {% for category, msg in messages %} {% endfor %} {% endwith %}

Edit '{{ item.name }}'

{{ form.hidden_tag() }} {% for field in form %} {% if field.name != "csrf_token" %} {% for error in field.errors %}

{{ error }}

{% endfor %} {% if field.name == 'value' %}
{{ form.value.label(class="input-group-text w-80") }} {{ form.comparision.label(class="input-group-text w-40") }}
{{ form.value2.label(class="input-group-text w-100") }}
{{ form.value(class="form-control w-50", value=form.value.data) }}
{{ form.comparision(class="form-control", value=form.comparision.data) }}
{{ form.value2(class="form-control", value=form.value2.data) }}
{% elif field.name != 'comparision' and field.name != 'value2' %}
{{ field.label(class="input-group-text fixed-label") }}
{% if field.data is iterable and field.data is not string %} {% for option in field.choices %} {% endfor %} {% else %} {{ field(class="form-control", value=field.data) }} {% endif %}
{% if field.data is iterable and field.data is not string %}
{% for option in field.choices if option.0 in field.data %}
{{ option.1 }} ×
{% endfor %}
{% endif %} {% endif %} {% endif %} {% endfor %}

{% endblock %}