<.header>
<%= @title %>
<:subtitle>Use this form to manage translation records in your database.
<.simple_form
:let={f}
for={@changeset}
id="translation-form"
phx-target={@myself}
phx-change="validate"
phx-submit="save"
>
<.input field={{f, :article_id}} type="hidden" />
<.input field={{f, :lang}} type="select" label="lang"
options={Application.get_env(:outlook,:deepl)[:target_langs]} />
<.input field={{f, :title}} type="text" label="title" />
<.input field={{f, :teaser}} type="textarea" label="teaser" class="h-28" />
<%!-- <.input field={{f, :content}} type="text" label="content" /> --%>
<.input field={{f, :date}} type="datetime-local" label="date" />
<.input field={{f, :public}} type="checkbox" label="public" />
<.input field={{f, :unauthorized}} type="checkbox" label="unauthorized" />
<:actions>
<.button phx-disable-with="Saving...">Save Translation
<.tunit_editor current_tunit={@current_tunit} target={@myself} />
<.button phx-disable-with="Translating..." phx-click="translate-deepl" phx-target={@myself}
data-confirm-not="Are you sure? All previously translated text will be lost.">Translate with Deepl
<.render_doc tree={@article_tree} />