Disable only form-opening link

Close other forms on new form open
This commit is contained in:
2024-02-04 20:11:44 +01:00
parent 76aae56ed5
commit 759a0b31b7
4 changed files with 17 additions and 17 deletions

View File

@@ -1,10 +1,7 @@
<%# TODO: make sure turbo_stream layout is used in new/edit %>
<%= turbo_stream.disable :add_unit %>
<%= turbo_stream.disable_all 'td.actions .button' %>
<%= turbo_stream.replace @unit, partial: 'form' %>
<%= turbo_stream.replace @unit, partial: 'form', locals: {id: dom_id(@unit, :edit)} %>
<%= turbo_stream.update :unit_form_frame do %>
<%= form_with model: @unit, html: {id: :unit_form} do %>
<% end %>
<% end %>
<% end unless @unit.errors.present? %>