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>
This commit is contained in:
parent
d4c066abf0
commit
5e5b8acfec
@ -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):
|
||||
|
@ -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 %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user