<%= form_for @survey, url: {action: "create"} do |f| %> <% if @survey.errors.any? %>

<%= pluralize(@survey.errors.count, "error") %> prohibited this question from being saved:

<% end %>
<%= f.label :title, "Titre du sondage :"%>
<%= f.text_field :title %>
<%= f.label :description, "Description :" %>
<%= f.text_field :description %>

<%= f.check_box :definitive_answer, checked: "checked" %> <%= f.label :definitive_answer, "Les réponses sont elles définitives ?" %>

<%= f.label :visibility, "La visiblité des résultats du sondage :"%>
<%= f.select :visibility, Survey.visibilities.keys, {}, {class: 'browser-default2'} %>
<%= f.label :limit_date, "La date limite de dépot des réponses :"%>
<%= f.text_field :limit_date, class: "datepicker" %>

<%= f.check_box :accepted_after, checked: "checked" %> <%= f.label :accepted_after, "Les réponses sont elles acceptés après la date limite ?" %>

À quelle promotion s'adresse se sondage :

<%= f.check_box :promo2018, checked: "checked" %> <%= f.label :promo2018 %>

<%= f.check_box :promo2017, checked: "checked" %> <%= f.label :promo2017 %>

<%= f.check_box :promo2016, checked: "checked" %> <%= f.label :promo2016 %>

Questions :

    <%= f.fields_for :questions do |question|%> <%= render 'question_fields', f: question%> <% end %>
<%= f.button 'Submit send'.html_safe, url: {action: "create"}, class: "btn waves-effect waves-light", type: "submit", name: "action" %>
<% end %>