{%- if not request.args.get('modal') -%} {% extends 'admin/master.html' %} {%- endif -%} {% import 'admin/lib.html' as lib with context %} {% block body %} {%- if request.args.get('modal') -%} {# content added to modal-content #} {{ lib.render_form(form, dir_url, action=request.url, is_modal=True) }} {%- else -%} {% block header_text -%} {{ _gettext('Rename %(name)s', name=name) }} {%- endblock %} {{ lib.render_form(form, dir_url) }} {%- endif -%} {% endblock %} {% block tail %} {%- if request.args.get('modal') -%} {%- endif -%} {% endblock %}