mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-09 03:20:21 +00:00
Accept only image files
Leaving the more specific validation in the Rails model (rather than try to duplicate it).
This commit is contained in:
@@ -13,4 +13,4 @@
|
||||
%input{ class: "secondary", type: 'button', value: t('.close'), "data-action": "click->modal#close" }
|
||||
-# label.button provides a handy shortcut to open the file selector on click. Unfortunately this trick isn't keyboard accessible though..
|
||||
= f.label :attachment, t(".upload"), class: "button primary icon-upload-alt"
|
||||
= f.file_field :attachment, style: "display: none", "data-action": "change->form#submit"
|
||||
= f.file_field :attachment, accept: "image/*", style: "display: none", "data-action": "change->form#submit"
|
||||
|
||||
Reference in New Issue
Block a user