Sha256: 791e8e4e3c871965ed21daa2aa12a3b6ef0a0c4d05fcd50c59fe41e2e298a139
Contents?: true
Size: 844 Bytes
Versions: 19
Compression:
Stored size: 844 Bytes
Contents
<%= form_for [:admin, object], html: {multipart: true, class: 'upload-button'} do |f| %> <%= f.file_field file_attribute, class: 'fileupload--field', name: "#{f.object_name}[#{file_attribute}]", id: "replace_#{dom_id(object)}" %> <%= label_tag "replace_#{dom_id(object)}", title: Alchemy.t(:replace_file) do %> <%= render_icon :sync %> <% end %> <% end %> <% file_types = local_assigns[:file_types].presence || configuration(:uploader)['allowed_filetypes'][object.class.model_name.collection] || ['*'] %> <script type='text/javascript'> $(function() { var options = { selector: '#replace_<%= dom_id(object) %>', file_types: '<%= file_types.join("|") %>', complete: function() { Turbo.visit('<%= redirect_url.html_safe %>'); } }; Alchemy.Uploader(options); }); </script>
Version data entries
19 entries across 19 versions & 1 rubygems