]> projects.mako.cc - selectricity-live/blobdiff - app/views/election/edit_candidates.rhtml
Remove deprecated start_form_tag and end_form_tags. Now you're supposed to do form_ta...
[selectricity-live] / app / views / election / edit_candidates.rhtml
index b5f06ff31856dd1e0822ed12cf5388f353a7509f..99f2f129abd0607b2308d256d52572dc775d6c96 100644 (file)
@@ -1,4 +1,6 @@
-<h1><strong><%= @election.name %>:</strong> Edit Candidates</h1>
+<h1>Edit/Add Candidates</h1>
+
+<%= error_messages_for :candidate %>
 
 <% unless @election.candidates.empty? %>
   <p>The following are valid options or candidates in this election:</p>
 <% else %>
   <p>There are no candidates registered for this election.</p>
 <% end %>
+
 <p>Please enter new candidates below.</p>
-<%= render :partial => 'candidates_form' %>
+
+<% form_tag( { :action => :add_candidate, :id => @election.id },
+              :multipart => true ) do %>
+<%= render :partial => 'candidate_form' %>
+<%= submit_tag "Add Candidate" %>
+<% end %>
+
 <%= button_to "Done!", :action => 'show', :id => @election %>

Benjamin Mako Hill || Want to submit a patch?