diff --git a/lib/mv_web/live/custom_field_live/form_component.ex b/lib/mv_web/live/custom_field_live/form_component.ex index 3c1b8d0..4fe8579 100644 --- a/lib/mv_web/live/custom_field_live/form_component.ex +++ b/lib/mv_web/live/custom_field_live/form_component.ex @@ -22,7 +22,12 @@ defmodule MvWeb.CustomFieldLive.FormComponent do
- <.button type="button" phx-click="cancel" phx-target={@myself} aria-label={gettext("Back to custom field overview")}> + <.button + type="button" + phx-click="cancel" + phx-target={@myself} + aria-label={gettext("Back to custom field overview")} + > <.icon name="hero-arrow-left" class="w-4 h-4" />

diff --git a/lib/mv_web/live/custom_field_live/index_component.ex b/lib/mv_web/live/custom_field_live/index_component.ex index 9b8ff0d..50eeaae 100644 --- a/lib/mv_web/live/custom_field_live/index_component.ex +++ b/lib/mv_web/live/custom_field_live/index_component.ex @@ -34,7 +34,9 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do module={MvWeb.CustomFieldLive.FormComponent} id={@form_id} custom_field={@editing_custom_field} - on_save={fn custom_field, action -> send(self(), {:custom_field_saved, custom_field, action}) end} + on_save={ + fn custom_field, action -> send(self(), {:custom_field_saved, custom_field, action}) end + } on_cancel={fn -> send_update(__MODULE__, id: @id, show_form: false) end} />