<%= error_messages_for 'doodle' %>

<div class="box tabular">
  <p><%= f.text_field :title, :required => true, :size => 60 %></p>
  <p><%= f.text_field :expiry_date, :size => 10 %><%= calendar_for('doodle_expiry_date') %></p>
  <p><%= f.text_area :description, :cols => 60, :rows => 3 %>
  <% if @doodle.new_record? %>
  <div id="options">
    <%= render :partial => 'options', :locals => {:options => @doodle.options} %>
  </div>
  <p><%= link_to_function l(:label_add_options) do |page|
      page.insert_html :bottom, :options, :partial => 'options', :locals => {:options => nil}
    end %></p>
  <p><label><%= l(:label_doodle_should_answer) %></label>
  <% @project.users.sort.each do |user| -%>
  <label class="floating"><%= check_box_tag 'doodle[should_answer_ids][]', user.id %> <%=h user %></label>
  <% end -%>
  </p>
  <% end %>
</div>
<%= error_messages_for 'doodle' %>

<div class="box tabular">
  <p><%= f.text_field :title, :required => true, :size => 60 %></p>
  <p><%= f.text_field :expiry_date, :size => 10 %><%= calendar_for('doodle_expiry_date') %></p>
  <p><%= f.text_area :description, :cols => 60, :rows => 8, :class => 'wiki-edit' %>
  <% if @doodle.new_record? %>
  <div id="options">
    <%= render :partial => 'options', :locals => {:options => @doodle.options} %>
  </div>
  <p><%= link_to_function l(:label_add_options) do |page|
      page.insert_html :bottom, :options, :partial => 'options', :locals => {:options => nil}
    end %></p>
  <p><label><%= l(:label_doodle_should_answer) %></label>
  <% @project.users.sort.each do |user| -%>
  <label class="floating"><%= check_box_tag 'doodle[should_answer_ids][]', user.id %> <%=h user %></label>
  <% end -%>
  </p>
  <% end %>
</div>

<%= wikitoolbar_for 'doodle_description' %>
Add a wiki toolbar to the description field
Add a wiki toolbar to the description field
