Add accept HTML attribute to documents form file input.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-24 16:19:35 +02:00
parent 0edd5d8c2c
commit a709cd0479
2 changed files with 9 additions and 1 deletions

View File

@@ -16,7 +16,9 @@
<div class="small-12 column">
<div class="file-name">
<%= f.file_field :attachment, label: false, class: 'show-for-sr' %>
<%= f.file_field :attachment,
accept: accepted_content_types_extensions(@document.documentable),
label: false, class: 'show-for-sr' %>
<%= f.label :attachment, t("documents.form.attachment_label"), class: 'button hollow' %>
<p><%= document_attachment_file_name(@document) %></p>
</div>