<%= form_for @changeset, ~p"/forums/#{@forum}/topics", fn f -> %> <%= if @changeset.action do %>

Oops, something went wrong! Please check the errors below.

<% end %>

Create a Topic

<%= text_input(f, :title, class: "input input--wide", placeholder: "Title") %> <%= error_tag(f, :title) %> <%= error_tag(f, :slug) %>
<%= 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.") %> <% end %>
<%= render(PhilomenaWeb.MarkdownView, "_anon_checkbox.html", conn: @conn, f: f, label: "Post anonymously") %> <%= inputs_for f, :poll, fn fp -> %>
<%= render(PhilomenaWeb.Topic.PollView, "_form.html", Map.put(assigns, :f, fp)) %>
<% end %>
<%= submit("Post", class: "button", data: [disable_with: raw("Posting…")]) %>
<% end %>