{#- Admin form to add or edit an edition. typed holds what a refused save sent, when the view shows the form again with the reason flashed above it, so the fields keep what was typed instead of what is stored. The controls the form locks keep showing what is stored. Without typed the fields show the stored edition. -#} {% extends "base_template.html" %} {%- set typed = typed if typed is defined else none %} {%- macro shown(name, stored) -%} {{ typed.get(name, '') if typed is not none else stored }} {%- endmacro %} {% block title %}{{ 'Edit edition' if edition else 'Add edition' }}{% endblock %} {% block content %}