<%= if @changeset.action do %>
Oops, something went wrong! Please check the errors below.
<%= for {error_key, error} <- @changeset.errors |> Keyword.drop([:post_title, :post_content]) do %>
<%= if error do %>
- <%= error_key %>: <%= error_tag f, error_key %>
<% end %>
<% end %>
<% end %>
<%= label f, :post_title do %>
Title
<%= text_input f, :post_title %>
<% end %>
<%= label f, :post_content, "data-react-class": "Editor" do %>
Content
<%= textarea f, :post_content, "data-simplemde": true %>
<% end %>
<%= submit "Delete", class: "btn btn-warning", form: "deleteForm" %>
<%= submit "Save", class: "btn btn-primary" %>
<%= label f, :post_status, class: "column input-group" do %>
Status
<%= select f, :post_status, [{"Publish", :publish}, {"Draft", :draft}] %>
<% end %>
<%= label f, :post_author, class: "input-group" do %>
Author
<%= select f, :post_author, @author_options |> Enum.map(&({&1.display_name, &1."ID"})) %>
<% end %>
<%= label f, :post_excerpt, class: "input-group" do %>
Excerpt
<%= textarea f, :post_excerpt %>
<% end %>
<%= label f, :sticky, class: "input-group" do %>
Sticky?
<%= checkbox f, :sticky %>
<% end %>
<%= label f, :comment_status, class: "input-group" do %>
Comment Status
<%= select f, :comment_status, ["open", "closed"] %>
<% end %>
<%= label f, :ping_status, class: "input-group" do %>
Ping Status
<%= select f, :ping_status, ["open", "closed"] %>
<% end %>
<%= label f, :post_password, class: "input-group" do %>
Post Password
<%= text_input f, :post_password %>
<% end %>
<%= label f, :post_name, class: "input-group" do %>
Slug
<%= text_input f, :post_name %>
<% end %>
<%= label f, :post_order, class: "input-group" do %>
Post Order
<%= number_input f, :post_order %>
<% end %>