@@ -34,6 +36,6 @@
<%= form.button id: :create_measurement_button, disabled: true -%>
<%= image_link_to t(:cancel), "close-outline", measurements_path, name: :cancel,
- class: 'dangerous', onclick: render_turbo_stream('form_close') %>
+ class: 'dangerous', data: {action: 'click->form#cancel'} %>
<% end %>
diff --git a/app/views/measurements/_form_close.html.erb b/app/views/measurements/_form_close.html.erb
deleted file mode 100644
index 78511d4..0000000
--- a/app/views/measurements/_form_close.html.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= turbo_stream.update :flashes %>
-<%= turbo_stream.remove :measurement_form %>
-<%= turbo_stream.show :no_items -%>
-<%= turbo_stream.enable :new_measurement_link -%>
diff --git a/app/views/quantities/_form.html.erb b/app/views/quantities/_form.html.erb
index 684cfd4..7ecc653 100644
--- a/app/views/quantities/_form.html.erb
+++ b/app/views/quantities/_form.html.erb
@@ -18,7 +18,7 @@
<%= form.button %>
<%= image_link_to t(:cancel), "close-outline", quantities_path, class: 'dangerous',
- name: :cancel, onclick: render_turbo_stream('form_close', {row: row}) %>
+ name: :cancel, data: {action: 'click->form#cancel'} %>
|
|
<% end %>
diff --git a/app/views/quantities/_form_close.html.erb b/app/views/quantities/_form_close.html.erb
deleted file mode 100644
index e79ea3c..0000000
--- a/app/views/quantities/_form_close.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= turbo_stream.close_form row %>
-<%= turbo_stream.update :flashes %>
diff --git a/app/views/units/_form.html.erb b/app/views/units/_form.html.erb
index 15485c6..4f2d179 100644
--- a/app/views/units/_form.html.erb
+++ b/app/views/units/_form.html.erb
@@ -16,7 +16,7 @@
<%= form.button %>
<%= image_link_to t(:cancel), "close-outline", units_path, class: 'dangerous',
- name: :cancel, onclick: render_turbo_stream('form_close', {row: row}) %>
+ name: :cancel, data: {action: 'click->form#cancel'} %>
|
|
<% end %>
diff --git a/app/views/units/_form_close.html.erb b/app/views/units/_form_close.html.erb
deleted file mode 100644
index e79ea3c..0000000
--- a/app/views/units/_form_close.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-<%= turbo_stream.close_form row %>
-<%= turbo_stream.update :flashes %>