{% extends 'base.html' %} {% block title %}IvoryOS | Controller for {{instrument}}{% endblock %} {% block body %}

{{instrument}} controller

{% set hidden = session.get('hidden_functions', {}) %}
{% for function, form in forms.items() %} {% set hidden_instrument = hidden.get(instrument, []) %} {% if function not in hidden_instrument %}
{{ form.hidden_tag() }} {% for field in form %} {% if field.type not in ['CSRFTokenField', 'HiddenField'] %}
{% if field.type == "SubmitField" %} {{ field(class="btn btn-dark") }} {% elif field.type == "BooleanField" %} {{ field(class="form-check-input") }} {% else %} {{ field(class="form-control") }} {% endif %}
{% endif %} {% endfor %}
{% endif %} {% endfor %}

{% set hidden_instrument = hidden.get(instrument, []) %} {% for function in hidden_instrument %}
{{ function }}
{% endfor %}
{% endblock %}