diff --git a/app/views/admin/poll/polls/_form.html.erb b/app/views/admin/poll/polls/_form.html.erb index 8de8af670..0b99ea9f5 100644 --- a/app/views/admin/poll/polls/_form.html.erb +++ b/app/views/admin/poll/polls/_form.html.erb @@ -1,34 +1,46 @@ <%= form_for [:admin, @poll] do |f| %>
- <%= f.text_field :name, - placeholder: t('admin.polls.form.name'), - label: t("admin.polls.form.name") %> + <%= f.text_field :name %>
- <%= f.label :starts_at, t("admin.polls.form.starts_at") %> <%= f.text_field :starts_at, - label: false, value: @poll.starts_at.present? ? l(@poll.starts_at.to_date) : nil, class: "js-calendar-full" %>
- <%= f.label :ends_at, t("admin.polls.form.ends_at") %> <%= f.text_field :ends_at, - label: false, 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 %> \ No newline at end of file +<% end %> diff --git a/app/views/admin/poll/questions/_form.html.erb b/app/views/admin/poll/questions/_form.html.erb index dbc8883e3..e5c228b4e 100644 --- a/app/views/admin/poll/questions/_form.html.erb +++ b/app/views/admin/poll/questions/_form.html.erb @@ -29,17 +29,6 @@ ckeditor: { language: I18n.locale } %> -
- <%= f.collection_check_boxes(:geozone_ids, @geozones, :id, :name) do |b| %> -
- <%= b.label do %> - <%= b.check_box + b.text %> - <% end %> -
- <% end %> -
- <%# TODO include all link %> -
<%= f.submit(class: "button expanded", value: t("shared.save")) %> @@ -48,4 +37,4 @@
-<% end %> \ No newline at end of file +<% end %>