changeset 2335:acddea75972b

basic modify view
author sharky93 <rishabhr123@gmail.com>
date Tue, 23 Jul 2013 18:03:23 +0530
parents cdae9a157786
children f844f7307aa6
files MoinMoin/templates/forms.html MoinMoin/templates/modify_text.html MoinMoin/themes/basic/templates/modify.html
diffstat 3 files changed, 37 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/forms.html	Mon Jul 22 21:43:07 2013 +0530
+++ b/MoinMoin/templates/forms.html	Tue Jul 23 18:03:23 2013 +0530
@@ -96,7 +96,7 @@
     {{ gen.label(field) }}
   </dt>
   <dd>
-    {{ gen.textarea(field, rows=field.properties.rows|string, cols=field.properties.cols|string) }}
+    {{ gen.textarea(field, rows=field.properties.rows|string, cols=field.properties.cols|string, **kwargs) }}
     {{ render_errors(field) }}
   </dd>
 {% endmacro %}
--- a/MoinMoin/templates/modify_text.html	Mon Jul 22 21:43:07 2013 +0530
+++ b/MoinMoin/templates/modify_text.html	Tue Jul 23 18:03:23 2013 +0530
@@ -2,6 +2,6 @@
 
 {% macro data_editor(form, item_name) %}
 {{ base_editor(form) }}
-{{ gen.textarea(form['data_text'], rows=form.rows|string, cols=form.cols|string) }}
+{{ gen.textarea(form['data_text'], rows=form.rows|string, cols=form.cols|string, **kwargs) }}
 <br />
 {% endmacro %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/themes/basic/templates/modify.html	Tue Jul 23 18:03:23 2013 +0530
@@ -0,0 +1,35 @@
+{% extends "modify.html" %}
+
+{% block content %}
+<h2>{{ title }}</h2>
+<div id="moin-modify" class="moin-form">
+    {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}
+    {{ forms.render_errors(form) }}
+    {#
+       Workaround:
+       For *Draw content, hide submit button and form['comment'], since *Draw
+       POSTs originate from their respective applets.
+    #}
+    {% if not form['content_form'].is_draw %}
+        {{ forms.render_submit(form, class='btn btn-primary', id='moin-save-text-button') }}
+        <dl>
+            {{ forms.render_textcha(gen, form) }}
+            {{ forms.render(form['comment']) }}
+        </dl>
+    {% endif %}
+    {{ data_editor(form['content_form'], item_name, class='input-block-level') }}
+    {% if form['content_form'].help %}
+        <pre id="moin-editor-help">{{ form['content_form'].help }}</pre>
+    {% endif %}
+    {{ meta_editor(form['meta_form']) }}
+    <dl>
+        {{ forms.render(form['extra_meta_text'], class='span6') }}
+    </dl>
+    {#
+    {{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }}
+    <br />
+    {{ forms.render_errors(form['meta_text']) }}
+    #}
+    {{ gen.form.close() }}
+</div>
+{% endblock %}
\ No newline at end of file