%= form_for [:admin, @poll] do |f| %>
<%= f.text_field :name %>
<%= f.text_field :starts_at,
value: @poll.starts_at.present? ? l(@poll.starts_at.to_date) : nil,
class: "js-calendar-full" %>
<%= f.text_field :ends_at,
value: @poll.ends_at.present? ? l(@poll.ends_at.to_date) : nil,
class: "js-calendar-full" %>
<%= f.check_box :geozone_restricted, data: { checkbox_toggle: "#geozones" } %>
<%= f.collection_check_boxes(:geozone_ids, @geozones, :id, :name) do |b| %>
<%= b.label do %>
<%= b.check_box + b.text %>
<% end %>
<% end %>
<%= f.submit t("admin.polls.#{admin_submit_action(@poll)}.submit_button"),
class: "button success expanded" %>
<% end %>