chiya/lib/chiya_web/controllers/setting_html/setting_form.html.heex

21 lines
834 B
Text

<.simple_form :let={f} for={@changeset} action={@action}>
<.error :if={@changeset.action}>
Oops, something went wrong! Please check the errors below.
</.error>
<.input field={f[:title]} type="text" label="Title" />
<.input field={f[:subtitle]} type="text" label="Subtitle" />
<.input
field={f[:theme]}
type="select"
label="Theme"
prompt="Choose a value"
options={Ecto.Enum.values(Chiya.Site.Setting, :theme)}
/>
<.input field={f[:user_agent]} type="text" label="User agent" />
<.input field={f[:custom_css]} type="textarea" label="Custom css" />
<.input field={f[:custom_html]} type="textarea" label="Custom html" />
<.input field={f[:home_channel_id]} type="select" label="Home Channel" options={@channels} />
<:actions>
<.button>Save Setting</.button>
</:actions>
</.simple_form>