changeset 220:62452154e3a0

templates.forms: duplicated require class definition removed
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 07 May 2011 22:36:53 +0200
parents 96b17384932a
children f6b21ea7a2dd
files MoinMoin/templates/forms.html
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/forms.html	Sat May 07 22:11:30 2011 +0200
+++ b/MoinMoin/templates/forms.html	Sat May 07 22:36:53 2011 +0200
@@ -16,12 +16,11 @@
 {% endmacro %}
 
 {% macro render_field(gen, field, field_type) %}
-  {% set f_class = "optional" if field.optional else "required" %}
   <dt>
-    {{ gen.label(field, class=f_class) }}
+    {{ gen.label(field) }}
   </dt>
   <dd>
-    {{ gen.input(field, class=f_class, type=field_type) }}
+    {{ gen.input(field, type=field_type) }}
     {{ render_errors(field) }}
   </dd>
 {% endmacro %}
@@ -44,13 +43,13 @@
 {% macro render_textcha(gen, form) %}
     {% if form.textcha_question.value %}
     <dt>
-        {{ gen.label(form.textcha, class="required") }}
+        {{ gen.label(form.textcha) }}
     </dt>
     <dd>
         {# The value of -51 below is the sum of signature length, timestamp and a space (see security/textcha.py) #}
         {{ form.textcha_question.value[:-51] }}
-        {{ gen.input(form.textcha_question, class=f_class, type='hidden') }}<br />
-        {{ gen.input(form.textcha, class="required") }}
+        {{ gen.input(form.textcha_question, type='hidden') }}<br />
+        {{ gen.input(form.textcha) }}
         {{ render_errors(form.textcha) }}
     </dd>
     {% endif %}