Files
grecia/app/views/admin/poll/questions/_form.html.erb
Javi Martín d1249d0b4f Update poll questions translatable fields
We need to replace ".title=" by ".title_#{locale}=" in one place because
for some reason globalize builds a new translation record when using the
latter but it doesn't build one when using the former.
2018-10-22 16:13:30 +02:00

28 lines
876 B
Plaintext

<%= render "admin/shared/globalize_locales", resource: @question %>
<%= translatable_form_for(@question, url: form_url) do |f| %>
<%= render 'shared/errors', resource: @question %>
<%= f.hidden_field :proposal_id %>
<div class="small-12">
<div class="small-12 medium-6 large-4">
<% select_options = Poll.all.map { |p| [p.name, p.id] } %>
<%= f.select :poll_id,
options_for_select(select_options),
prompt: t("admin.questions.index.select_poll"),
label: t("admin.questions.new.poll_label") %>
</div>
<%= f.translatable_fields do |translations_form| %>
<%= translations_form.text_field :title %>
<% end %>
<div class="small-12 medium-4 large-2 margin-top">
<%= f.submit(class: "button success expanded", value: t("shared.save")) %>
</div>
</div>
<% end %>