Skip to content

Commit

Permalink
Merge pull request #268 from alphagov/add-file-upload-example
Browse files Browse the repository at this point in the history
Use the button style to prompt for a file upload
  • Loading branch information
gemmaleigh authored Jun 29, 2016
2 parents 87d5c45 + 4d5735f commit 108b5e6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/views/examples/example_form_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,21 @@ <h2 class="heading-medium">
</div>
</div>

<div class="form-section">
<!--File upload -->
<div class="form-group">
{% include "snippets/form_file_upload.html" %}
</div>

<!--File upload with error -->
<div class="form-group error">
<span class="error-message">
Error message goes here
</span>
{% include "snippets/form_file_upload.html" %}
</div>
</div>

</form>

<div class="form-section">
Expand Down
4 changes: 4 additions & 0 deletions app/views/snippets/form_file_upload.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<label class="button">
Upload a file
<input type="file" class="hidden" />
</label>

0 comments on commit 108b5e6

Please sign in to comment.