Files
grecia/app/views/admin/poll/questions/_form.html.erb
2016-11-22 11:41:10 +01:00

41 lines
1.1 KiB
Plaintext

<%= form_for(@question, url: form_url) do |f| %>
<%= render 'shared/errors', resource: @question %>
<%= f.hidden_field :proposal_id %>
<div class="row">
<div class="small-12 column">
<%= f.text_field :title, maxlength: Poll::Question.title_max_length %>
<%= f.text_field :valid_answers %>
<%= f.text_area :summary, rows: 4, maxlength: 200 %>
<div class="ckeditor">
<%= f.cktext_area :description,
maxlength: Poll::Question.description_max_length,
ckeditor: { language: I18n.locale } %>
</div>
<div class="row">
<%= f.collection_check_boxes(:geozone_ids, @geozones, :id, :name) do |b| %>
<div class="small-6 medium-3 column">
<%= b.label do %>
<%= b.check_box + b.text %>
<% end %>
</div>
<% end %>
</div>
<%# TODO include all link %>
<div class="row">
<div class="actions small-12 medium-4 column margin-top">
<%= f.submit(class: "button expanded", value: t("shared.save")) %>
</div>
</div>
</div>
</div>
<% end %>