1 <h2>Edit/Add Candidates</h2>
3 <%= error_messages_for :candidate %>
5 <% unless @election.candidates.empty? %>
6 <p>The following are valid options or candidates in this election:</p>
9 <% @election.candidates.each do |candidate| %>
10 <% @current_candidate = candidate %>
11 <%= render :partial => 'candidate_line_edit' %>
15 <p>There are no candidates registered for this election.</p>
18 <p>Please enter new candidates below.</p>
20 <% form_tag( { :action => :add_candidate, :id => @election.id },
21 :multipart => true ) do %>
22 <%= render :partial => 'candidate_form' %>
23 <%= submit_tag "Add Candidate" %>
26 <%= button_to "Done!", :action => 'new_voters', :id => @election %>