Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the button style to prompt for a file upload #268

Merged
merged 1 commit into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest, why hidden and not visually-hidden?

</label>