changeset 1989:ff77f6d8da38

substitute forms.render_button with forms.render_submit
author Cheer Xiao <xiaqqaix@gmail.com>
date Tue, 12 Feb 2013 17:16:07 +0800
parents 490c13d072f2
children 22441b6366e6
files MoinMoin/templates/forms.html MoinMoin/templates/usersettings_forms.html
diffstat 2 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/forms.html	Tue Feb 12 10:28:18 2013 +0800
+++ b/MoinMoin/templates/forms.html	Tue Feb 12 17:16:07 2013 +0800
@@ -19,10 +19,6 @@
   <input type="hidden" name="{{ name }}" value="{{ value }}" />
 {% endmacro %}
 
-{% macro render_button(text) %}
-  <button type="submit">{{ text }}</button>
-{% endmacro %}
-
 {% macro render_submit(form) %}
   {{ gen.input(type='submit', value=form.submit_label, class='button', **kwargs) }}
 {% endmacro %}
--- a/MoinMoin/templates/usersettings_forms.html	Tue Feb 12 10:28:18 2013 +0800
+++ b/MoinMoin/templates/usersettings_forms.html	Tue Feb 12 17:16:07 2013 +0800
@@ -11,7 +11,7 @@
     {{ forms.render(form['locale']) }}
 </dl>
 {{ forms.render_hidden('part', 'personal') }}
-{{ forms.render_button(_("Save")) }}
+{{ forms.render_submit(form) }}
 {{ gen.form.close() }}
 {% endmacro %}
 
@@ -25,7 +25,7 @@
     {{ forms.render(form['password2']) }}
 </dl>
 {{ forms.render_hidden('part', 'password') }}
-{{ forms.render_button(_("Change password")) }}
+{{ forms.render_submit(form) }}
 {{ gen.form.close() }}
 {% endmacro %}
 
@@ -39,7 +39,7 @@
     {{ forms.render(form['email']) }}
 </dl>
 {{ forms.render_hidden('part', 'notification') }}
-{{ forms.render_button(_("Save")) }}
+{{ forms.render_submit(form) }}
 {{ gen.form.close() }}
 {% endmacro %}
 
@@ -53,7 +53,7 @@
     {{ forms.render(form['results_per_page']) }}
 </dl>
 {{ forms.render_hidden('part', 'ui') }}
-{{ forms.render_button(_("Save")) }}
+{{ forms.render_submit(form) }}
 {{ gen.form.close() }}
 {% endmacro %}
 
@@ -64,7 +64,7 @@
     {# TODO: find a good way to handle quicklinks #}
 </dl>
 {{ forms.render_hidden('part', 'navigation') }}
-{{ forms.render_button(_("Save")) }}
+{{ forms.render_submit(form) }}
 {{ gen.form.close() }}
 {% endmacro %}
 
@@ -79,7 +79,7 @@
     {{ forms.render(form['disabled']) }}
 </dl>
 {{ forms.render_hidden('part', 'options') }}
-{{ forms.render_button(_("Save")) }}
+{{ forms.render_submit(form) }}
 {{ gen.form.close() }}
 {% endmacro %}