diff --git a/app/views/plan/_plan_item.html.erb b/app/views/plan/_plan_item.html.erb index f67c832..c4e3ac0 100644 --- a/app/views/plan/_plan_item.html.erb +++ b/app/views/plan/_plan_item.html.erb @@ -121,7 +121,8 @@ plan_item_path(plan_item), method: :delete, class: "plan-item__remove", - aria: { label: "Remove from plan" } %> + aria: { label: "Remove from plan" }, + data: { turbo_confirm: "Remove '#{item.title}' from your plan?" } %> <% end %> <% end %> diff --git a/app/views/schedule/_session_item.html.erb b/app/views/schedule/_session_item.html.erb index 7e97394..3d87eef 100644 --- a/app/views/schedule/_session_item.html.erb +++ b/app/views/schedule/_session_item.html.erb @@ -73,10 +73,9 @@
<% if item.embassy? %> <% if planned && existing_plan %> - <%= link_to button_label, plan_path, + <%= link_to button_label, plan_path(anchor: dom_id(existing_plan)), class: "add-btn add-btn--added", - data: { turbo_frame: "_top" }, - aria: { pressed: true } %> + data: { turbo_frame: "_top" } %> <% elsif item.full? %> <% else %> @@ -95,20 +94,16 @@

<% end %> <% elsif planned && existing_plan %> - <%= button_to button_label, - plan_item_path(existing_plan), - method: :delete, - class: "add-btn add-btn--added", - data: { turbo_frame: dom_id(item) }, - aria: { pressed: true } %> + <%= link_to button_label, plan_path(anchor: dom_id(existing_plan)), + class: "add-btn add-btn--added", + data: { turbo_frame: "_top" } %> <% else %> <%= button_to button_label, plan_items_path, method: :post, params: { schedule_item_id: item.id }, class: "add-btn", - data: { turbo_frame: dom_id(item) }, - aria: { pressed: false } %> + data: { turbo_frame: dom_id(item) } %> <% end %> <% if rsvp_note %>