<%= render "shared/globalize_locales", resource: @question %>

<%= translatable_form_for [:admin, @process, @question], url: url do |f| %>

  <%= render "shared/errors", resource: @question %>

  <div class="row">
    <%= f.translatable_fields do |translations_form| %>
      <div class="small-12 medium-9 column end">
        <%= translations_form.text_field :title %>
      </div>

      <div class="small-12 medium-9 column end">
        <%= translations_form.text_area :description, class: "html-area admin" %>
      </div>
    <% end %>
  </div>

  <div class="row">
    <div class="small-12 medium-9 column">
      <%= f.label :question_options, t("admin.legislation.questions.form.question_options") %>
    </div>

    <div id="nested_question_options">
      <%= f.fields_for :question_options do |ff| %>
        <%= render "question_option_fields", f: ff %>
      <% end %>

      <div class="js-add-fields-container">
        <div class="small-12 medium-9 column">
          <%= link_to_add_association t("admin.legislation.questions.form.add_option"),
                                      f,
                                      :question_options,
                                      class: "button hollow" %>
        </div>
      </div>
    </div>

    <div class="small-12 medium-6 large-3 clear column end margin-top">
      <%= f.submit(class: "button success expanded", value: t("admin.legislation.questions.#{admin_submit_action(@question)}.submit_button")) %>
    </div>
  </div>
<% end %>
