ensl.org/app/views/polls/_form.html.erb

32 lines
764 B
Text
Raw Permalink Normal View History

2014-04-27 01:35:13 +00:00
<div id="poll">
<%= form_for(@poll, html: { class: 'square' }) do |f| %>
<%= render 'shared/errors', messages: @poll.errors.full_messages %>
2014-04-27 01:35:13 +00:00
<div class="fields horizontal">
<%= f.label :question %>
<%= f.text_field :question %>
2014-04-27 01:35:13 +00:00
</div>
2014-04-27 01:35:13 +00:00
<div class="fields horizontal">
<%= f.label :end_date %>
<%= f.datetime_select :end_date, datetime_separator: '', time_separator: '' %>
</div>
<h3 class="title">Options</h3>
<div id="options">
<%= f.fields_for :options do |opt| %>
2014-04-27 01:35:13 +00:00
<%= render 'option', f: opt %>
<% end %>
</div>
<p>
<%= link_to_add_fields "Add an Option", f, :options %>
</p>
2014-04-27 01:35:13 +00:00
<div class="controls">
<%= f.submit 'Save' %>
</div>
<% end %>
</div>