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

<%= translatable_form_for(question, url: url) do |f| %>

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

  <%= f.hidden_field :proposal_id %>

  <div class="row">
    <div class="small-12">
      <% if question.poll.present? %>
        <%= f.hidden_field :poll_id, value: question.poll.id %>
      <% else %>
        <div class="small-12 medium-6 large-4 column">
          <%= f.select :poll_id,
                       options_for_select(select_options),
                       prompt: t("admin.questions.index.select_poll"),
                       hint: t("admin.questions.form.poll_help") %>
        </div>
      <% end %>
    </div>
  </div>

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

  <div class="row">
    <div class="small-12">
      <%= f.fields_for :votation_type do |votation_f| %>
        <%= render Admin::VotationTypes::FieldsComponent.new(form: votation_f) %>
      <% end %>
    </div>
  </div>

  <div class="row">
    <div class="small-12 medium-4 large-2 margin-top column">
      <%= f.submit(class: "button success expanded", value: t("shared.save")) %>
    </div>
  </div>

<% end %>
