{% extends 'base.html' %} {% block title %}IvoryOS | Controllers {% endblock %} {% block body %}

{% if instrument and forms %} {#

{{ instrument }} controller

#}
{% set hidden = session.get('hidden_functions', {}) %} {% set hidden_instrument = hidden.get(instrument, []) %} {% for function, form in forms.items() %} {% 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 %}

{% for function in hidden_instrument %}
{{ function }}
{% endfor %}
{% else %}
Select an instrument to view its methods.
{% endif %}
{% endblock %}