diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-25 15:50:31 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-06-25 16:28:45 -0700 |
commit | 1e21471a8abbf3f9d0d0e16a0f2c83c22ffe9650 (patch) | |
tree | f38988b3c7e1c4d3a22e11e09ca328864d825cb6 /mediagoblin/templates | |
parent | 15db1831514aeb9fd77b7bf43a2718b1ffc4d552 (diff) | |
download | mediagoblin-1e21471a8abbf3f9d0d0e16a0f2c83c22ffe9650.tar.lz mediagoblin-1e21471a8abbf3f9d0d0e16a0f2c83c22ffe9650.tar.xz mediagoblin-1e21471a8abbf3f9d0d0e16a0f2c83c22ffe9650.zip |
added feature to render_divs where if field.label == '' then it will render form.description the same a render_label
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/edit/edit_account.html | 7 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/utils/wtforms.html | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_account.html b/mediagoblin/templates/mediagoblin/edit/edit_account.html index 461dd6df..fa7a9c48 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_account.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_account.html @@ -46,12 +46,7 @@ {% trans %}Change your password.{% endtrans %} </a> </p> - {{ wtforms_util.render_field_div(form.new_email) }} - <div class="form_field_input"> - <p>{{ form.wants_comment_notification }} - {{ wtforms_util.render_label(form.wants_comment_notification) }}</p> - </div> - {{- wtforms_util.render_field_div(form.license_preference) }} + {{ wtforms_util.render_divs(form) }} <div class="form_submit_buttons"> <input type="submit" value="{% trans %}Save changes{% endtrans %}" class="button_form" /> {{ csrf_token }} diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html index 90b237ee..f522172f 100644 --- a/mediagoblin/templates/mediagoblin/utils/wtforms.html +++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html @@ -47,7 +47,11 @@ {% endfor %} {%- endif %} {%- if field.description %} - <p class="form_field_description">{{ field.description|safe }}</p> + {% if field.label.text == '' %} + <label for="{{ field.label.field_id }}">{{ field.description|safe }}</label> + {% else %} + <p class="form_field_description">{{ field.description|safe }}</p> + {% endif %} {%- endif %} </div> {%- endmacro %} |