mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
28 lines
1.2 KiB
Text
28 lines
1.2 KiB
Text
= form_for @changeset, ~p"/forums/#{@forum}/topics", fn f ->
|
|
= if @changeset.action do
|
|
.alert.alert-danger
|
|
p Oops, something went wrong! Please check the errors below.
|
|
|
|
h1 Create a Topic
|
|
|
|
.field
|
|
= text_input f, :title, class: "input input--wide", placeholder: "Title"
|
|
= error_tag f, :title
|
|
= error_tag f, :slug
|
|
|
|
.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."
|
|
|
|
.block__content.communication-edit__wrap
|
|
= render PhilomenaWeb.MarkdownView, "_anon_checkbox.html", conn: @conn, f: f, label: "Post anonymously"
|
|
|
|
= inputs_for f, :poll, fn fp ->
|
|
#add-poll.field
|
|
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)
|
|
|
|
.block__content.communication-edit__actions
|
|
= submit "Post", class: "button", data: [disable_with: raw("Posting…")]
|