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>
8 <% @election.candidates.each do |candidate| %>
9 <% @current_candidate = candidate %>
10 <%= render :partial => 'candidate_line_edit' %>
14 <p>There are no candidates registered for this election.</p>
17 <p>Please enter new candidates below.</p>
19 <% form_tag( { :action => :add_candidate, :id => @election.id },
20 :multipart => true ) do %>
21 <%= render :partial => 'candidate_form' %>
22 <%= submit_tag "Add Candidate" %>
25 <%= button_to "Done!", :action => 'new_voters', :id => @election %>