1
0
Fork 0
forked from OpenNeo/impress

Fix confirmation prompts for various actions

These were depending on the `rails-ujs` scripts we haven't had in here
for a while! Now, they use the new equivalent Turbo attributes.
This commit is contained in:
Emi Matchu 2024-03-13 13:56:10 -07:00
parent 9fe44e3f91
commit 5631b02157
2 changed files with 9 additions and 8 deletions

View file

@ -8,10 +8,12 @@
.closet-list-controls
= link_to t('.edit'), edit_user_closet_list_path(closet_list.user_id, closet_list)
= form_tag user_closet_list_path(closet_list.user_id, closet_list), :method => 'delete' do
= submit_tag t('.delete'), :confirm => closet_list_delete_confirmation(closet_list)
= submit_tag t('.delete'),
data: {turbo_confirm: closet_list_delete_confirmation(closet_list)}
= form_tag user_closet_hangers_path(@user), method: :delete, class: 'remove-all' do
= hidden_field_tag :list_id, closet_list.id
= submit_tag t('.remove_all.submit'), confirm: t('.remove_all.confirm')
= submit_tag t('.remove_all.submit'),
data: {turbo_confirm: t('.remove_all.confirm')}
%button.select-all= t('.select_all')
%h4= closet_list.name

View file

@ -4,11 +4,10 @@
%header
.outfit-star
= link_to outfit.name, outfit, :class => 'outfit-name'
= link_to outfit.name, outfit, class: 'outfit-name'
%footer
= link_to t('.edit'), outfit, :class => 'outfit-edit-link'
= button_to t('.delete'), outfit, :method => 'delete',
:class => 'outfit-delete-button',
:confirm => t('.delete_confirmation',
:outfit_name => outfit.name)
= link_to t('.edit'), outfit, class: 'outfit-edit-link'
= button_to t('.delete'), outfit, method: 'delete',
class: 'outfit-delete-button',
data: {turbo_confirm: t('.delete_confirmation', outfit_name: outfit.name)}