Giving schendje some auth registration descriptions so he can style them!
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 29 Aug 2011 15:43:11 +0000 (10:43 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 29 Aug 2011 15:43:11 +0000 (10:43 -0500)
mediagoblin/auth/forms.py
mediagoblin/templates/mediagoblin/utils/wtforms.html

index 917909c5995266eab555102e271856b9cd4588bf..d1f3c5dc24c91d2824abf239ecc43b1ab7726727 100644 (file)
@@ -24,21 +24,29 @@ class RegistrationForm(wtforms.Form):
         _('Username'),
         [wtforms.validators.Required(),
          wtforms.validators.Length(min=3, max=30),
-         wtforms.validators.Regexp(r'^\w+$')])
+         wtforms.validators.Regexp(r'^\w+$')],
+        description=_(
+            u"This is the name other users will identify you with."))
     password = wtforms.PasswordField(
         _('Password'),
         [wtforms.validators.Required(),
          wtforms.validators.Length(min=6, max=30),
          wtforms.validators.EqualTo(
                 'confirm_password',
-                _('Passwords must match.'))])
+                _('Passwords must match.'))],
+        description=_(
+            u"Try to use a strong password!"))
     confirm_password = wtforms.PasswordField(
         _('Confirm password'),
-        [wtforms.validators.Required()])
+        [wtforms.validators.Required()],
+        description=_(
+            u"Type it again here to make sure there are no spelling mistakes."))
     email = wtforms.TextField(
         _('Email address'),
         [wtforms.validators.Required(),
-         wtforms.validators.Email()])
+         wtforms.validators.Email()],
+        description=_(
+            u"Your email will never be published."))
 
 
 class LoginForm(wtforms.Form):
index 2639522a3bd240676b4cfa518649b14182b5c556..4038de9855bd9e148e8b06d6c6395ab532a890c1 100644 (file)
@@ -20,9 +20,6 @@
 {% macro render_field_div(field) %}
   <div class="form_field_box">
     <div class="form_field_label">{{ _(field.label.text) }}</div>
-    {% if field.description -%}
-      <div class="form_field_description">{{ _(field.description) }}</div>
-    {%- endif %}
     <div class="form_field_input">{{ field }}</div>
     {%- if field.errors -%}
       {% for error in field.errors %}
@@ -31,6 +28,9 @@
         </div>
       {% endfor %}
     {%- endif %}
+    {% if field.description -%}
+      <div class="form_field_description">{{ _(field.description) }}</div>
+    {%- endif %}
   </div>
 {%- endmacro %}