aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLotusEcho <Emma.C.Echo@gmail.com>2012-09-24 16:15:34 -0400
committerSebastian Spaeth <Sebastian@SSpaeth.de>2012-11-13 15:47:34 +0100
commit5e5b8acfec73ad7f12eb685ff81c6962aee655f1 (patch)
tree4101cabaedb27fd2d719271de3ba0bc488e8c8e7
parentd4c066abf017bc7af8fa30a25248dbae9e40355d (diff)
downloadmediagoblin-5e5b8acfec73ad7f12eb685ff81c6962aee655f1.tar.lz
mediagoblin-5e5b8acfec73ad7f12eb685ff81c6962aee655f1.tar.xz
mediagoblin-5e5b8acfec73ad7f12eb685ff81c6962aee655f1.zip
Don't put checkbox text on separate line (#475)
Manually render the "notify me" checkbox line in the account settings to not put the form label as a heading but in the same line as the checkbox. Edit forms.py to use the label attribute for the caption. Original patch modified by Sebastian Spaeth to 1) not translate the checkbox label in the template, it is translated in forms.py already. 2) Simplify the HTML, manually constructing the <label> tag is not necessary, WTforms does it automatically. Author: LotusEcho <Emma.C.Echo@gmail.com> Modified-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
-rw-r--r--mediagoblin/edit/forms.py3
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit_account.html12
2 files changed, 9 insertions, 6 deletions
diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
index 856852b6..293c3bb2 100644
--- a/mediagoblin/edit/forms.py
+++ b/mediagoblin/edit/forms.py
@@ -68,8 +68,7 @@ class EditAccountForm(wtforms.Form):
[wtforms.validators.Length(min=6, max=30)],
id="password")
wants_comment_notification = wtforms.BooleanField(
- _(''),
- description=_("Email me when others comment on my media"))
+ label=_("Email me when others comment on my media"))
class EditAttachmentsForm(wtforms.Form):
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_account.html b/mediagoblin/templates/mediagoblin/edit/edit_account.html
index 9bacb157..38d99893 100644
--- a/mediagoblin/templates/mediagoblin/edit/edit_account.html
+++ b/mediagoblin/templates/mediagoblin/edit/edit_account.html
@@ -32,8 +32,7 @@
{% block mediagoblin_content %}
-
- <form action="{{ request.urlgen('mediagoblin.edit.account') }}?username={{
+ <form action="{{ request.urlgen('mediagoblin.edit.account') }}?username={{
user.username }}"
method="POST" enctype="multipart/form-data">
<div class="form_box edit_box">
@@ -42,11 +41,16 @@
Changing {{ username }}'s account settings
{%- endtrans %}
</h1>
- {{ wtforms_util.render_divs(form) }}
+ {{ wtforms_util.render_field_div(form.old_password) }}
+ {{ wtforms_util.render_field_div(form.new_password) }}
+ <div class="form_field_input">
+ <p>{{ form.wants_comment_notification }}
+ {{ form.wants_comment_notification.label }}</p>
+ </div>
<div class="form_submit_buttons">
<input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button_form" />
{{ csrf_token }}
</div>
</div>
</form>
-{% endblock %}
+{% endblock %}