Major integration of Courtland's design into the QuickVotes.
[selectricity-live] / app / views / election / edit_candidates.rhtml
1 <h2>Edit/Add Candidates</h2>
2
3 <%= error_messages_for :candidate %>
4
5 <% unless @election.candidates.empty? %>
6   <p>The following are valid options or candidates in this election:</p>
7 1;3A
8
9   <% @election.candidates.each do |candidate| %>
10     <% @current_candidate = candidate %>
11     <%= render :partial => 'candidate_line_edit' %>
12   <% end %>
13
14 <% else %>
15   <p>There are no candidates registered for this election.</p>
16 <% end %>
17
18 <p>Please enter new candidates below.</p>
19
20 <% form_tag( { :action => :add_candidate, :id => @election.id },
21               :multipart => true ) do %>
22 <%= render :partial => 'candidate_form' %>
23 <%= submit_tag "Add Candidate" %>
24 <% end %>
25
26 <%= button_to "Done!", :action => 'new_voters', :id => @election %>

Benjamin Mako Hill || Want to submit a patch?