Skip to content

Commit

Permalink
Issue #867. Use HTML for <label> rather than form helper method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Dec 31, 2015
1 parent 8f751e9 commit f4ef68f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions webcompat/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ class IssueForm(Form):
[InputRequired(message=radio_message)],
choices=problem_choices)
# we filter allowed type in uploads.py
# Note, we don't use the label programtically for this input[type=file],
# any changes here need to be updated in form.html.
image = FileField(u'Attach a screenshot image',
[Optional(),
FileAllowed(Upload.ALLOWED_FORMATS, image_message)])
Expand Down
2 changes: 1 addition & 1 deletion webcompat/templates/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<div class="wc-Form-upload-icon" aria-hidden="true">
<span class="wc-Icon wc-Icon--cloud-upload"></span>
</div>
{{ form.image.label(class_='wc-Form-label wc-Form-label--upload') }}
<label class="wc-Form-label wc-Form-label--upload">Attach a screenshot image</label>
{% if form.image.errors %}
{% for error in form.image.errors %}
<span class="wc-Form-helpInline wc-bold">{{ error }}</span>
Expand Down

0 comments on commit f4ef68f

Please sign in to comment.