Sha256: bf59b9199ef4a8781e11afcff999e47ae2c8d83f240d5f4cac6d27bb891aabf1
Contents?: true
Size: 723 Bytes
Versions: 28
Compression:
Stored size: 723 Bytes
Contents
<% file_upload_id = "file_upload_#{dom_id(object)}" %> <alchemy-uploader id="<%= file_upload_id %>"> <%= 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)}", class: "icon_button" do %> <%= render_icon "file-upload" %> <% end %> <% end %> </alchemy-uploader> <script type='text/javascript'> document.getElementById("<%= file_upload_id %>").addEventListener("Alchemy.upload.successful", (event) => { Turbo.visit('<%= redirect_url.html_safe %>'); }) </script>
Version data entries
28 entries across 28 versions & 1 rubygems