{%- if not modal -%} {% extends 'admin/master.html' %} {%- endif -%} {% import 'admin/lib.html' as lib with context %} {% macro extra() %} {% endmacro %} {% block head %} {%- if not modal -%} {{ super() }} {{ lib.form_css() }} {%- endif -%} {% endblock %} {% block body %} {%- if modal -%} {# remove save and continue button for modal (it won't function properly) #} {{ lib.render_form(form, return_url, extra=None, form_opts=form_opts, action=request.url, is_modal=True) }} {%- else -%} {% block navlinks %}
{% endblock %} {{ lib.render_form(form, return_url, extra(), form_opts) }} {%- endif -%} {% endblock %} {% block tail %} {%- if modal -%} {%- else -%} {{ super() }} {{ lib.form_js() }} {%- endif -%} {% endblock %}