{% import "bootstrap5/form.html" as wtf %} {% extends "templates/base.html" %} {% block scripts %} {{super()}} {% endblock %} {%- block styles %} {{ super() }} {% endblock %} {% block title %}{{ title }}{% endblock %} {% block container %}

{{ title }}

{% if method != 'POST' %} {% endif %} {{ form.csrf_token }} {# disable type selection when editing an existing resource #} {{ wtf.render_field(form.type, form_type="horizontal", horizontal_columns=('sm', 2, 5), disabled=(method != 'POST')) }} {{ wtf.render_field(form.name, form_type="horizontal", horizontal_columns=('sm', 2, 5)) }} {# custom select field with resource type as data in options for parent resource #}
{{ wtf.render_field(form.submit, class="col-sm-offset-2 btn btn-primary") }}
{% if form.type.data == 'map' and id %}
{% endif %} {% endblock %}