This way people using screen readers will hear the required dimensions of the images while filling in the form.
22 lines
709 B
Plaintext
22 lines
709 B
Plaintext
<div class="site-customization-images-table-actions">
|
|
<%= form_for([:admin, image], html: { id: "edit_#{dom_id(image)}" }) do |f| %>
|
|
<div>
|
|
<%= image_tag image.image if image.persisted_attachment? %>
|
|
<%= f.file_field :image,
|
|
label: false,
|
|
"aria-label": image.name,
|
|
"aria-describedby": dom_id(image, :hint) %>
|
|
</div>
|
|
|
|
<%= f.submit(t("admin.site_customization.images.index.update"), class: "button hollow") %>
|
|
<% end %>
|
|
|
|
<% if image.persisted_attachment? %>
|
|
<%= render Admin::ActionComponent.new(
|
|
:destroy,
|
|
image,
|
|
path: admin_site_customization_image_path(image)
|
|
) %>
|
|
<% end %>
|
|
</div>
|