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:
parent
9fe44e3f91
commit
5631b02157
2 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)}
|
||||
|
|
Loading…
Reference in a new issue