{% macro buttons() %}
{%- if save_allowed -%} Сохранить {%- endif -%}
{% endmacro %} {% block content %}

{{ title }}

{% block after_title %}{% endblock -%} {% block buttons_top %}{{ buttons() }}{% endblock %} {% from "macros/autosave_status.html" import autosave_status %} {{ autosave_status(autosave_allowed, draft) }}
{{ form.render() }}
{% block preview %}{% endblock %}
{%- if form.item.id and item_lock -%} {% from 'macros/item_lock.html' import main as item_lock with context %} {{ item_lock(form.item, url_for('index'), lock_timeout, lock_message, edit_session) }} {%- endif -%}
{% endblock %}