fixed a large number of bugs in the software (see wiki) over a days work
[selectricity] / app / views / election / edit_voters.rhtml
1 <div id="title-header">
2   <span class="header">Edit Voter List</span>
3   <span class="subheader"></span>
4 </div>
5
6 <% if @election.active == 0 %>
7
8 <p id="unauth_notice" <%= 'style="display: none;"' if @election.authenticated %>>
9 <% if @election.kiosk? %>
10   <em>Because you have enabled kiosk mode, there will be no registration of voters.</em>
11 <% end %>
12 Anyone will be able to vote in this election.</p>
13
14 <div id="voter_info_box" <%= 'style="display: none;"' unless @election.authenticated %>>
15 <%= render :partial => 'voter_list' %>
16
17 <% form_tag (:action => 'edit_voters', :id => @election.id) do %>
18 <%= render :partial => 'voters_form' %>
19 <% end %>
20 </div>
21
22 <% unless @election.kiosk? %>
23   <%= check_box :election, :authenticated %> Only allow registered voters 
24 <% end %>
25
26 <%= observe_field "election_authenticated",
27       :url => { :action => 'toggle_authenticated', :id => @election.id },
28       :complete => 'Element.toggle($("voter_info_box")); Element.toggle($("unauth_notice"));',
29       :with => 'authenticated' %>
30
31 <script type="text/javascript">
32 </script>
33
34 <div class="normal-header">
35   <span class="header">Continue</span>
36   <span class="subheader"></span>
37 </div>
38
39 <p>When you are done entering voters, please click the button below
40 to proceed to the next step.</p>
41
42 <%= button_to 'Proceed to Next Step', :action => 'show', :id => @election.id %>
43
44 <% else %>
45
46 <p>You can not edit the list of voters once the election has begun.
47 please return to the <%= link_to "election overview page", :action =>
48 'show', :id => @election.id %>.</p>
49
50 <% end %>
51

Benjamin Mako Hill || Want to submit a patch?