diff --git a/lib/outlook_web/live/translation_live/form_component.ex b/lib/outlook_web/live/translation_live/form_component.ex index b58de1b..88112af 100644 --- a/lib/outlook_web/live/translation_live/form_component.ex +++ b/lib/outlook_web/live/translation_live/form_component.ex @@ -32,18 +32,20 @@ defmodule OutlookWeb.TranslationLive.FormComponent do <.input field={{f, :public}} type="checkbox" label="public" /> <.input field={{f, :unauthorized}} type="checkbox" label="unauthorized" /> + + <:actions> - <.button phx-click={JS.set_attribute({"value", "false"}, to: "#continue_edit")} + <.button phx-click={JS.set_attribute({"value", "false"}, to: "#continue_edit") |> JS.set_attribute({"value", "false"}, to: "#publish")} phx-disable-with="Saving...">Save Translation - - <.button phx-click={JS.set_attribute({"value", "true"}, to: "#continue_edit")} + <.button phx-click={JS.set_attribute({"value", "false"}, to: "#continue_edit") |> JS.set_attribute({"value", "true"}, to: "#publish")} + phx-disable-with="Saving...">Save and Publish + <.button phx-click={JS.set_attribute({"value", "true"}, to: "#continue_edit") |> JS.set_attribute({"value", "false"}, to: "#publish")} phx-disable-with="Saving...">Save and Edit <.tunit_editor current_tunit={@current_tunit} target={@myself} /> -