Add dropdown for language of Article

And a configuration with the available Deepl source and target languages.
This commit is contained in:
Thelonius Kort
2022-12-30 21:13:59 +01:00
parent a0b280438c
commit d9022fb0c7
2 changed files with 65 additions and 1 deletions

View File

@ -23,7 +23,8 @@ defmodule OutlookWeb.ArticleLive.FormComponent do
<.input field={{f, :author_id}} type="hidden" />
<.input field={{f, :title}} type="text" label="title" />
<.input field={{f, :url}} type="text" label="url" />
<.input field={{f, :language}} type="text" label="language" />
<.input field={{f, :language}} type="select" label="language"
options={Application.get_env(:outlook,:deepl)[:source_langs]} />
<.input field={{f, :date}} type="datetime-local" label="date" />
<:actions>
<.button phx-disable-with="Saving...">Save Article</.button>