projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A few major changes:
[selectricity-live]
/
app
/
views
/
election
/
edit_candidates.rhtml
diff --git
a/app/views/election/edit_candidates.rhtml
b/app/views/election/edit_candidates.rhtml
index b5f06ff31856dd1e0822ed12cf5388f353a7509f..dbcc3f8bad3b49a550c4c5159195bdf3542c17e8 100644
(file)
--- a/
app/views/election/edit_candidates.rhtml
+++ b/
app/views/election/edit_candidates.rhtml
@@
-1,4
+1,6
@@
-<h1><strong><%= @election.name %>:</strong> Edit Candidates</h1>
+<h1><strong><%= @election.name %>:</strong> Edit/Add Candidates</h1>
+
+<%= error_messages_for :candidate %>
<% unless @election.candidates.empty? %>
<p>The following are valid options or candidates in this election:</p>
<% unless @election.candidates.empty? %>
<p>The following are valid options or candidates in this election:</p>
@@
-11,6
+13,13
@@
<% else %>
<p>There are no candidates registered for this election.</p>
<% end %>
<% else %>
<p>There are no candidates registered for this election.</p>
<% end %>
+
<p>Please enter new candidates below.</p>
<p>Please enter new candidates below.</p>
-<%= render :partial => 'candidates_form' %>
+
+<%= form_tag( { :action => :add_candidate, :id => @election.id },
+ :multipart => true ) %>
+<%= render :partial => 'candidate_form' %>
+<%= submit_tag "Add Candidate" %>
+<%= end_form_tag %>
+
<%= button_to "Done!", :action => 'show', :id => @election %>
<%= button_to "Done!", :action => 'show', :id => @election %>
Benjamin Mako Hill
||
Want to submit a patch?