]> projects.mako.cc - selectricity/blobdiff - app/views/election/edit_voters.rhtml
Major update of Selectricity to work with Rails 2.2.2 from 1.2!
[selectricity] / app / views / election / edit_voters.rhtml
index 8819b952d03b158e4334d8c2115ea873506f57cb..77093fe5262db3783c7589a014291708b199e5ef 100644 (file)
@@ -3,11 +3,26 @@
   <span class="subheader"></span>
 </div>
 
+<p id="unauth_notice" <%= 'style="display: none;"' if @election.authenticated %>>Anyone will be able to
+vote in this election.</p>
+
+<div id="voter_info_box" <%= 'style="display: none;"' unless @election.authenticated %>>
 <%= render :partial => 'voter_list' %>
 
 <% form_tag (:action => 'edit_voters', :id => @election.id) do %>
 <%= render :partial => 'voters_form' %>
 <% end %>
+</div>
+
+<%= check_box :election, :authenticated %> Only allow registered voters 
+
+<%= observe_field "election_authenticated",
+      :url => { :action => 'toggle_authenticated', :id => @election.id },
+      :complete => 'Element.toggle($("voter_info_box")); Element.toggle($("unauth_notice"));',
+      :with => 'authenticated' %>
+
+<script type="text/javascript">
+</script>
 
 <div class="normal-header">
   <span class="header">Continue</span>

Benjamin Mako Hill || Want to submit a patch?