<% content_for :title, "Ask a Meta Question" %>

<h1>Ask a Meta Question</h1>

<div class="notice">
  <i class="fas fa-info-circle"></i> You're asking a new question on <strong>Meta</strong>, our area for feedback
  and discussions about this site itself. If you're intending to ask a topical question on the main site, you're in
  the wrong place - you can do that <%= link_to 'here instead', new_question_path %>.
</div>

<% if @question.errors.any? %>
  <div class="notice is-error">
    <p>The following <%= "error".pluralize(@question.errors.count) %> prevented the question from being posted:</p>
    <ul>
      <% @question.errors.full_messages.each do |e| %>
        <li><%= e %></li>
      <% end %>
    </ul>
  </div>
<% end %>

<%= render 'posts/image_upload' %>

<%= render 'form', meta?: true %>

<% if SiteSetting['AskingGuidance'] %>
  <% content_for :sidebar do %>
    <div class="widget has-margin-4">
      <h4 class="widget--header has-margin-0">Hints and Tips</h4>
      <div class="widget--body">
        <%= raw(sanitize(render_markdown(SiteSetting['AskingGuidance']), scrubber: scrubber)) %>
      </div>
    </div>
  <% end %>
<% end %>
