changeset 1531:10fd322b21c8

Foobar theme template forms modified
author Jaiditya Mathur <jaiditya.mathur@gmail.com>
date Sun, 15 Jul 2012 21:19:17 +0530
parents 31dd554f737f
children 99e448a2b061
files MoinMoin/themes/foobar/templates/delete.html MoinMoin/themes/foobar/templates/destroy.html MoinMoin/themes/foobar/templates/login.html MoinMoin/themes/foobar/templates/lostpass.html MoinMoin/themes/foobar/templates/modify_applet.html MoinMoin/themes/foobar/templates/modify_binary.html MoinMoin/themes/foobar/templates/recoverpass.html MoinMoin/themes/foobar/templates/register.html MoinMoin/themes/foobar/templates/rename.html
diffstat 9 files changed, 32 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/foobar/templates/delete.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/delete.html	Sun Jul 15 21:19:17 2012 +0530
@@ -6,10 +6,10 @@
 {{ gen.form.open(form, method="post", action=url_for('frontend.delete_item', item_name=item.name)) }}
   {{ forms.render_errors(form) }}
   <dl>
-    {{ forms.render_field(gen, form['comment'], 'text') }}
+    {{ forms.render(form['comment']) }}
     {{ forms.render_textcha(gen, form) }}
   </dl>
-  {{ gen.input(form['submit'], type='submit') }}
+  {{ forms.render(form['submit']) }}
 {{ gen.form.close() }}
 </div>
 {% endblock %}
--- a/MoinMoin/themes/foobar/templates/destroy.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/destroy.html	Sun Jul 15 21:19:17 2012 +0530
@@ -7,10 +7,10 @@
     {{ gen.form.open(form, method="post", action=url_for('frontend.destroy_item', item_name=item.name)) }}
       {{ forms.render_errors(form) }}
       <dl>
-        {{ forms.render_field(gen, form['comment'], 'text') }}
+        {{ forms.render(form['comment']) }}
         {{ forms.render_textcha(gen, form) }}
       </dl>
-      {{ gen.input(form['submit'], type='submit') }}
+      {{ forms.render(form['submit']) }}
     {{ gen.form.close() }}
     </div>
 {% else %}
@@ -19,10 +19,10 @@
     {{ gen.form.open(form, method="post", action=url_for('frontend.destroy_item', item_name=item.name, rev=rev_id)) }}
       {{ forms.render_errors(form) }}
       <dl>
-        {{ forms.render_field(gen, form['comment'], 'text') }}
+        {{ forms.render(form['comment']) }}
         {{ forms.render_textcha(gen, form) }}
       </dl>
-      {{ gen.input(form['submit'], type='submit') }}
+      {{ forms.render(form['submit']) }}
     {{ gen.form.close() }}
     </div>
 {% endif %}
--- a/MoinMoin/themes/foobar/templates/login.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/login.html	Sun Jul 15 21:19:17 2012 +0530
@@ -12,13 +12,13 @@
   {{ gen.input(form['submit'], type='hidden') }}
 
   {% if 'username' in login_inputs %}
-  {{ forms.render_field(gen, form['username'], 'text') }}
+  {{ forms.render(form['username']) }}
   {% endif %}
   {% if 'password' in login_inputs %}
-  {{ forms.render_field(gen, form['password'], 'password') }}
+  {{ forms.render(form['password']) }}
   {% endif %}
 
-  <input type="submit" value="{{ _('Log in') }}" />
+  {{ forms.render(form['submit']) }}
 </dl>
 {{ gen.form.close() }}
 {% endif %}
@@ -29,11 +29,9 @@
 
 {{ gen.form.open(form, method="post", action=url_for('frontend.login')) }}
 <dl>
-  {{ gen.input(form['submit'], type='hidden') }}
-
-  {{ forms.render_field(gen, form['openid'], 'text') }}
-  <input type="submit" value="{{ _('Log in') }}" />
+  {{ forms.render(form['openid']) }}
 </dl>
+{{ forms.render(form['submit']) }}
 {{ gen.form.close() }}
 {% endif %}
 
--- a/MoinMoin/themes/foobar/templates/lostpass.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/lostpass.html	Sun Jul 15 21:19:17 2012 +0530
@@ -8,10 +8,10 @@
 {{ gen.form.open(form, method="post", action=url_for('frontend.lostpass')) }}
   {{ forms.render_errors(form) }}
   <dl>
-    {{ forms.render_field(gen, form['username'], 'text') }}
-    {{ forms.render_field(gen, form['email'], 'text') }}
+    {{ forms.render(form['username']) }}
+    {{ forms.render(form['email']) }}
   </dl>
-  {{ gen.input(form['submit'], type='submit') }}
+  {{ forms.render(form['submit']) }}
 {{ gen.form.close() }}
 </div>
-{% endblock %}
+{% endblock %}
\ No newline at end of file
--- a/MoinMoin/themes/foobar/templates/modify_applet.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/modify_applet.html	Sun Jul 15 21:19:17 2012 +0530
@@ -7,7 +7,7 @@
 {{ forms.render_errors(form) }}
 {% block extra_form %}{% endblock %}
 {% block data_editor %}{% endblock %}
-{{ forms.render_field(gen, form['data_file'], 'file') }}
+{{ forms.render(form['data_file']) }}
 <pre>{{ help }}</pre>
 {{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }}
 <br />
--- a/MoinMoin/themes/foobar/templates/modify_binary.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/modify_binary.html	Sun Jul 15 21:19:17 2012 +0530
@@ -1,7 +1,7 @@
 {% import "forms.html" as forms %}
 {% extends theme("modify_applet.html") %}
 {% block extra_form %}
-{{ gen.input(form['submit'], class='button', type='submit') }}
+{{ forms.render(form['submit']) }}
 {{ forms.render_textcha(gen, form) }}
-{{ forms.render_field(gen, form['comment'], 'text') }}
+{{ forms.render(form['comment']) }}
 {% endblock %}
--- a/MoinMoin/themes/foobar/templates/recoverpass.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/recoverpass.html	Sun Jul 15 21:19:17 2012 +0530
@@ -6,11 +6,11 @@
 {{ gen.form.open(form, method="post", action=url_for('frontend.recoverpass')) }}
   {{ forms.render_errors(form) }}
   <dl>
-    {{ forms.render_field(gen, form['username'], 'text') }}
-    {{ forms.render_field(gen, form['token'], 'text') }}
-    {{ forms.render_field(gen, form['password1'], 'password') }}
-    {{ forms.render_field(gen, form['password2'], 'password') }}
+    {{ forms.render(form['username']) }}
+    {{ forms.render(form['token']) }}
+    {{ forms.render(form['password1']) }}
+    {{ forms.render(form['password2']) }}
   </dl>
-  {{ gen.input(form['submit'], type='submit') }}
+  {{ forms.render(form['submit']) }}
 {{ gen.form.close() }}
 {% endblock %}
--- a/MoinMoin/themes/foobar/templates/register.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/register.html	Sun Jul 15 21:19:17 2012 +0530
@@ -7,14 +7,14 @@
 {{ gen.form.open(form, method="post", action=url_for('frontend.register')) }}
   {{ forms.render_errors(form) }}
   <dl>
-    {{ forms.render_field(gen, form['username'], 'text') }}
-    {{ forms.render_field(gen, form['password1'], 'password') }}
-    {{ forms.render_field(gen, form['password2'], 'password') }}
-    {{ forms.render_field(gen, form['email'], 'email') }}
-    {{ forms.render_field(gen, form['openid'], 'url') }}
+    {{ forms.render(form['username']) }}
+    {{ forms.render(form['password1']) }}
+    {{ forms.render(form['password2']) }}
+    {{ forms.render(form['email']) }}
+    {{ forms.render(form['openid']) }}
     {{ forms.render_textcha(gen, form) }}
   </dl>
-  {{ gen.input(form['submit'], type='submit') }}
+  {{ forms.render(form['submit']) }}
 {{ gen.form.close() }}
 </div>
 {% endblock %}
--- a/MoinMoin/themes/foobar/templates/rename.html	Sun Jul 15 20:32:17 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/rename.html	Sun Jul 15 21:19:17 2012 +0530
@@ -6,11 +6,11 @@
 {{ gen.form.open(form, method="post", action=url_for('frontend.rename_item', item_name=item.name)) }}
   {{ forms.render_errors(form) }}
   <dl>
-    {{ forms.render_field(gen, form['target'], 'text') }}
-    {{ forms.render_field(gen, form['comment'], 'text') }}
+    {{ forms.render(form['target']) }}
+    {{ forms.render(form['comment']) }}
     {{ forms.render_textcha(gen, form) }}
   </dl>
-  {{ gen.input(form['submit'], type='submit') }}
+  {{ forms.render(form['submit']) }}
 {{ gen.form.close() }}
 </div>
 {% endblock %}