Added the ability to do ajax adding of candidates so there is no longer
[selectricity] / app / views / quickvote / _candidate_list.rhtml
diff --git a/app/views/quickvote/_candidate_list.rhtml b/app/views/quickvote/_candidate_list.rhtml
new file mode 100644 (file)
index 0000000..1176e97
--- /dev/null
@@ -0,0 +1,17 @@
+<% %>
+<!-- the list of candidates -->
+<% if @flash[:candlist] %>
+  <ul>
+  <% for cand in @flash[:candlist] %>
+    <li><%= cand.capitalize %></li>
+  <% end %>
+  </ul>
+<% end %>
+
+<%= form_remote_tag :update => 'candlist',
+                    :url => { :action => 'add_candidate' } %>
+<p>
+  <%= text_field "ajax", "newcandidate", :size => 40 %>
+  <%= submit_tag "Add" %>
+</p>
+<%= end_form_tag %>

Benjamin Mako Hill || Want to submit a patch?