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-03-23 00:22:25 +00:00
|
|
|
|
2014-04-27 01:35:13 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :question %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.text_field :question %>
|
2014-04-27 01:35:13 +00:00
|
|
|
</div>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
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>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
|
|
|
<div id="options">
|
|
|
|
<%= f.fields_for :options do |opt| %>
|
2014-04-27 01:35:13 +00:00
|
|
|
<%= render 'option', f: opt %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<% 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>
|
|
|
|
|