philomena/lib/philomena_web/templates/topic/new.html.slime

29 lines
1.2 KiB
Text
Raw Permalink Normal View History

= 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.
h1 Create a Topic
2019-11-19 04:38:22 +01: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
.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
.block__content.communication-edit__wrap
= 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 ->
#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
= render PhilomenaWeb.Topic.PollView, "_form.html", Map.put(assigns, :f, fp)
2019-11-19 04:38:22 +01:00
.block__content.communication-edit__actions
2019-12-07 21:51:31 +01:00
= submit "Post", class: "button", data: [disable_with: raw("Posting…")]