view MoinMoin/templates/modify_applet.html @ 242:e93157b8b0bd

refactor modify views to use flatland, see details below code is more OO now, the Item instance now handles modify view AND post handling in do_modify() - moving this was needed so a flatland Form subclass could be used that depends on the Item type. moved item_modified event triggering to _save(). templates: use flatland generator to generate most form fields
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 29 May 2011 19:57:17 +0200
parents 7099a64c00ad
children a11656ba1eab
line wrap: on
line source
{% import "forms.html" as forms %}
{% extends theme("layout.html") %}
{% block content %}
<h1>{{ _("Modifying %(item_name)s", item_name=item_name) }}</h1>
<div class="moin-form">
{{, method='post', action='', enctype='multipart/form-data') }}
{{ forms.render_errors(form) }}
{{ gen.input(form['rev'], type='hidden') }}
{% block extra_form %}{% endblock %}
{% block data_editor %}{% endblock %}
            <label for="data_file">{{ _("Upload file:") }}</label>
            <input type="file" id="data_file" name="data_file" />
<pre>{{ help }}</pre>
{{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }}
<br />
{{ forms.render_errors(form['meta_text']) }}
{{ gen.form.close() }}
{% endblock %}