2024-06-06 22:28:35 +02:00
= form_for @changeset, ~p"/forums/#{@forum}/topics", fn f ->
2019-11-19 04:38:22 +01:00
= if @changeset.action do
.alert.alert-danger
p Oops, something went wrong! Please check the errors below.
2021-09-13 01:19:00 +02:00
h1 Create a Topic
2019-11-19 04:38:22 +01:00
2021-09-13 01:19:00 +02:00
.field
= text_input f, :title, class: "input input--wide", placeholder: "Title"
= error_tag f, :title
= error_tag f, :slug
2019-11-19 04:38:22 +01:00
2021-09-13 01:19:00 +02:00
.block
= inputs_for f, :posts, fn fp ->
= render PhilomenaWeb.MarkdownView, "_input.html", conn: @conn, f: fp, action_icon: "pencil-alt", action_text: "First Post", placeholder: "Please read the site rules before posting and use ||spoilers|| for NSFW stuff in SFW forums."
2019-11-19 04:38:22 +01:00
2024-06-12 20:50:46 +02:00
.block__content.communication__edit-wrap
2021-09-13 01:19:00 +02:00
= render PhilomenaWeb.MarkdownView, "_anon_checkbox.html", conn: @conn, f: f, label: "Post anonymously"
2019-11-19 04:38:22 +01:00
= inputs_for f, :poll, fn fp ->
2021-09-13 01:19:00 +02:00
#add-poll.field
2019-11-19 04:38:22 +01:00
input.toggle-box id="add_poll" name="add_poll" type="checkbox"
label for="add_poll" Add a poll
.toggle-box-container
2020-04-30 23:24:24 +02:00
= render PhilomenaWeb.Topic.PollView, "_form.html", Map.put(assigns, :f, fp)
2019-11-19 04:38:22 +01:00
2024-06-12 20:50:46 +02:00
.block__content.communication__edit-actions
2019-12-07 21:51:31 +01:00
= submit "Post", class: "button", data: [disable_with: raw("Posting…")]