oneshot
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
<Layouts.app flash={@flash} current_participant={@current_participant}>
|
||||
<div class="mx-auto max-w-xl">
|
||||
<.header>
|
||||
ルームを作成
|
||||
<:subtitle>投票の設定を入力してください。</:subtitle>
|
||||
</.header>
|
||||
|
||||
<div class="card bg-base-100 border border-base-200 shadow-sm mt-4">
|
||||
<div class="card-body">
|
||||
<.form for={@form} action={~p"/create"} method="post" id="create-room-form">
|
||||
<.input
|
||||
field={@form[:name]}
|
||||
type="text"
|
||||
label="ルーム名"
|
||||
placeholder="例:今日のランチ投票"
|
||||
required
|
||||
/>
|
||||
|
||||
<.input
|
||||
field={@form[:votes_per_user]}
|
||||
type="number"
|
||||
label="一人あたりの投票数"
|
||||
min="1"
|
||||
max="50"
|
||||
required
|
||||
/>
|
||||
|
||||
<div class="divider text-sm text-base-content/60">追加オプション</div>
|
||||
|
||||
<.input
|
||||
field={@form[:grouping_mode]}
|
||||
type="checkbox"
|
||||
label="グルーピングモードを有効にする(班分けアプリになります)"
|
||||
/>
|
||||
|
||||
<.input
|
||||
field={@form[:leader_threshold]}
|
||||
type="number"
|
||||
label="リーダーになるのに必要な票数(グルーピングモードのときのみ使用)"
|
||||
min="1"
|
||||
max="50"
|
||||
/>
|
||||
|
||||
<.input
|
||||
field={@form[:closes_at_local]}
|
||||
type="datetime-local"
|
||||
label="投票終了日時(任意・日本時間)"
|
||||
/>
|
||||
<p class="text-xs text-base-content/60 -mt-1 mb-3">
|
||||
指定すると、その日時に自動的に投票が終了します。
|
||||
</p>
|
||||
|
||||
<div class="flex items-center justify-between gap-3 mt-2">
|
||||
<.link navigate={~p"/"} class="btn btn-ghost btn-sm">
|
||||
戻る
|
||||
</.link>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<.icon name="hero-plus" class="size-4" /> ルームを作成
|
||||
</button>
|
||||
</div>
|
||||
</.form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Layouts.app>
|
||||
Reference in New Issue
Block a user