Improve flow for adding stages
Previously the new stage form replaced the list, now it properly appends
This commit is contained in:
@@ -14,9 +14,11 @@
|
||||
<%= turbo_frame_tag dom_id(workflow, :stages) do %>
|
||||
<%= render partial: "workflows/stages/stage", collection: workflow.stages %>
|
||||
|
||||
<%= link_to new_workflow_stage_path(workflow), class: "btn txt-small" do %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">New stage</span>
|
||||
<%= turbo_frame_tag dom_id(workflow, :new_stage) do %>
|
||||
<%= link_to new_workflow_stage_path(workflow), class: "btn txt-small" do %>
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">New stage</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= turbo_frame_tag dom_id(@stage.workflow, :stages) do %>
|
||||
<%= form_with model: @stage, url: workflow_stages_path(@stage.workflow), class: "flex align-center gap-half", data: { controller: "form" } do |form| %>
|
||||
<%= turbo_frame_tag dom_id(@stage.workflow, :new_stage) do %>
|
||||
<%= form_with model: @stage, url: workflow_stages_path(@stage.workflow), class: "flex align-center gap-half", data: { controller: "form", turbo_frame: dom_id(@stage.workflow, :stages) } do |form| %>
|
||||
<%= form.text_field :name, required: true, autofocus: true, class: "input", data: { action: "keydown.esc@document->form#cancel" } %>
|
||||
<%= form.button type: :submit, class: "btn btn--positive txt-small" do %>
|
||||
<%= icon_tag "check" %>
|
||||
|
||||
Reference in New Issue
Block a user