diff --git a/app/views/jobs/_cancel_button.html.erb b/app/views/jobs/_cancel_button.html.erb index a30b8c5..ccf186e 100644 --- a/app/views/jobs/_cancel_button.html.erb +++ b/app/views/jobs/_cancel_button.html.erb @@ -2,7 +2,7 @@ <%# TODO: Refactor! %> <% if current_user %> <% if allowed_to? :cancel?, job %> - <%= button_to icon("x-circle", class: "icon size-10 text-hsrm-red", title: "Druckauftrag abbrechen (Anmeldung erforderlich)"), cancel_job_path(job), method: :patch, form: {data: {turbo_confirm: 'Den Plottauftrag wirklich abbrechen?'}}, form_class: "inline" %> + <%= button_to icon("x-circle", class: "icon size-10 text-hsrm-red", title: "Druckauftrag abbrechen (Anmeldung erforderlich)"), cancel_job_path(job), method: :patch, target: "_top", form: {data: {turbo_frame: "_top", turbo_confirm: 'Den Plottauftrag wirklich abbrechen?'}}, form_class: "inline" %> <% else %> <% if job.open? %> <% if job.created_by_operator %> @@ -19,7 +19,7 @@ <% if job.created_by_operator %> <%= icon("x-circle", class: "icon icon-disabled size-10", title: "Druckauftrag kann nur vom Operator abgebrochen werden!") %> <% else %> - <%= button_to icon("x-circle", class: "icon size-10 text-hsrm-red", title: "Druckauftrag abbrechen (Anmeldung erforderlich)"), cancel_job_path(job), method: :patch, form: {data: {turbo_confirm: 'Den Plottauftrag wirklich abbrechen? (Anmeldung erforderlich!)'}}, form_class: "inline" %> + <%= button_to icon("x-circle", class: "icon size-10 text-hsrm-red", title: "Druckauftrag abbrechen (Anmeldung erforderlich)"), cancel_job_path(job), method: :patch, form: {data: {turbo_frame: "_top", turbo_confirm: 'Den Plottauftrag wirklich abbrechen? (Anmeldung erforderlich!)'}}, form_class: "inline" %> <% end %> <% else %> <%= icon("x-circle", class: "icon icon-disabled size-10", title: "Kann nicht mehr abgebrochen werden") %>