byceps/blueprints/admin/snippet/templates/admin/snippet/update_form.html
{% extends 'layout/admin/snippet.html' %}
{% from 'macros/admin.html' import render_backlink %}
{% from 'macros/forms.html' import form_buttons, form_field %}
{% set page_title = _('Edit snippet') %}
{% block before_body %}
{{ render_backlink(url_for('.view_current_version', snippet_id=snippet.id), snippet.name ~ ' (' ~ snippet.language_code ~ ')') }}
{%- endblock %}
{% block body %}
<h1 class="title">{{ page_title }}</h1>
<form action="{{ url_for('.update', snippet_id=snippet.id) }}" method="post">
<div class="box">
{{ form_field(form.name, maxlength=40, readonly='readonly', autofocus='autofocus') }}
{{ form_field(form.body, class='monospace') }}
</div>
{{ form_buttons(_('Save')) }}
</form>
{%- endblock %}