<% if @post.errors.any? %> <% end %> <%= form_for [:admin, @post], role: "form" do |f| %>
<%= f.label :title %>
<%= f.text_field :title, :autofocus => true, class: "form-control monospaced-control", placeholder: "Title (also used for URL slug)..." %>
<%= f.label :content_md, "Content" %>
<%= f.text_area :content_md, rows: 15, class: "form-control monospaced-control", placeholder: "Post content (Markdown format)..." %>
<%= f.check_box :draft %> <%= f.label :draft, "draft" %>
<%= f.label :updated_at, "Published date" %>
<%= f.datetime_select :updated_at, class: "form-control" %>
- <%= link_to "Cancel", admin_posts_dashboard_path %>
<% end %>