2023-03-07 23:05:25 +01:00
|
|
|
<.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" />
|
2023-03-30 22:55:24 +02:00
|
|
|
<.input field={f[:custom_css]} type="textarea" label="Custom css" class="font-mono" />
|
|
|
|
<.input field={f[:custom_html]} type="textarea" label="Custom html" class="font-mono" />
|
2023-06-11 22:22:22 +02:00
|
|
|
<.input field={f[:home_channel_id]} type="select" label="Home Channel" options={@channels} />
|
|
|
|
<.input
|
|
|
|
field={f[:micropub_channel_id]}
|
2023-06-11 20:39:14 +02:00
|
|
|
type="select"
|
2023-06-11 22:22:22 +02:00
|
|
|
label="Micropub Channel"
|
2023-06-11 20:39:14 +02:00
|
|
|
options={@channels}
|
|
|
|
/>
|
2023-05-07 10:32:21 +02:00
|
|
|
<.input
|
|
|
|
field={f[:default_channel_id]}
|
|
|
|
type="select"
|
|
|
|
label="Default Channel"
|
|
|
|
options={@channels}
|
|
|
|
/>
|
2023-03-07 23:05:25 +01:00
|
|
|
<:actions>
|
|
|
|
<.button>Save Setting</.button>
|
|
|
|
</:actions>
|
|
|
|
</.simple_form>
|