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

Version Path
alchemy_cms-7.3.4 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.3.3 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.3.2 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.2.7 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.3.1 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.3.0 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.2.6 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.2.5 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.12 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.2.4 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.11 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.2.3 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.10 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.2.2 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.9 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.2.1 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.8 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.7 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.6 app/views/alchemy/admin/attachments/_replace_button.html.erb
alchemy_cms-7.1.5 app/views/alchemy/admin/attachments/_replace_button.html.erb