Skip to content

Commit

Permalink
chore: rename form to original_form
Browse files Browse the repository at this point in the history
  • Loading branch information
MelchiorKokernoot committed Oct 24, 2024
1 parent 51f3f13 commit 5ce088c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/systems/content/page_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ defmodule Systems.Content.PageForm do

@impl true
def update(%{id: id, entity: %{body: body} = entity}, socket) do
form_data = to_form(%{"body" => body})
original_form = to_form(%{"body" => body})

{
:ok,
socket
|> assign(
id: id,
entity: entity,
form_data: form_data
original_form: original_form
)
}
end
Expand All @@ -41,7 +41,7 @@ defmodule Systems.Content.PageForm do
def render(assigns) do
~H"""
<div>
<.form id={"#{@id}_page_form"} :let={form} for={@form_data} phx-change="save" phx-target={@myself} >
<.form id={"#{@id}_page_form"} :let={form} for={@original_form } phx-change="save" phx-target={@myself} >
<!-- always render wysiwyg te prevent scrollbar reset in LiveView -->
<.wysiwyg_area form={form} field={:body} />
</.form>
Expand Down

0 comments on commit 5ce088c

Please sign in to comment.