<%= form_for [:admin, @process, @question], url: url, html: {data: {watch_changes: true}} do |f| %>

  <% if @question.errors.any? %>
    <div id="error_explanation" data-alert class="callout alert" data-closable>
      <button class="close-button" aria-label="<%= t("application.close") %>" type="button" data-close>
        <span aria-hidden="true">&times;</span>
      </button>

      <strong>
        <%= @question.errors.count %>
        <%= t("admin.legislation.questions.errors.form.error", count: @question.errors.count) %>
      </strong>
    </div>
  <% end %>

  <div class="small-12 medium-4 column">
    <%= f.label :title %>
  </div>
  <div class="small-12 medium-8 column">
    <%= f.text_area :title, rows: 5, label: false, placeholder: t('admin.legislation.questions.form.title_placeholder') %>
  </div>

  <div class="small-12 medium-4 column">
    <%= f.label :question_options %>
  </div>
  <div class="small-12 medium-8 column">
    <%= f.fields_for :question_options do |ff| %>
      <%= render 'question_option_fields', f: ff %>
    <% end %>
  </div>
  <div class="small-12 medium-8 column">
    <%= link_to_add_association t('.add_option'), f, :question_options %>
  </div>

  <div class="row">
    <div class="actions small-12 medium-3 column legislation-process-save">
      <%= f.submit(class: "button expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
    </div>
  </div>
<% end %>
