X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/c933ff40da110253bc4c474d9c79c3a4ed98721d..50b1cf56bf89fb9bb510481918d3c9d53a4bbad5:/app/views/election/edit_candidates.rhtml diff --git a/app/views/election/edit_candidates.rhtml b/app/views/election/edit_candidates.rhtml index 0c416d5..dbcc3f8 100644 --- a/app/views/election/edit_candidates.rhtml +++ b/app/views/election/edit_candidates.rhtml @@ -1,14 +1,25 @@ -<% @edit = true %> -
The following are valid options or candidates in this election:
+<%= error_messages_for :candidate %> -The following are valid options or candidates in this election:
+ + <% @election.candidates.each do |candidate| %> + <% @current_candidate = candidate %> + <%= render :partial => 'candidate_line_edit' %> + <% end %> + +<% else %> +There are no candidates registered for this election.
<% end %> -Please enter new candidates below.
+ +<%= 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 %>