]> projects.mako.cc - selectricity-live/blob - app/views/quickvote/create.rhtml
94081e6389490df425db021ebb6cf8866c309380
[selectricity-live] / app / views / quickvote / create.rhtml
1 <div id="page-title">
2         <span class="header">Quickvote</span>
3         <span class="subheader">Create New QuickVote</span>
4         <div style="clear:both;"></div>
5 </div>
6
7 <p><label for="quickvote_candidate_names">Choices</p>
8
9 <!-- the list of candidates -->
10 <div id="candidate_names">
11 <%= render :partial => 'candidate_list' %>
12 </div>
13
14 <% form_tag(:action => 'create') do %>
15 <!--[form:election]-->
16 <p><label for="quickvote_name">One Word Description (for URL)</label></p>
17
18 <p>required; 5-12 characters; only letters and numbers; no spaces</p>
19
20 <p><%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12  %></p>
21
22 <p><label for="quickvote_description">Description</label></p>
23
24 <p><font size="-1">required; free-form</font></em><br/>
25
26 <%= text_field 'quickvote', 'description', :size => 50 %></p>
27
28 <div id="advanced" style="display: none">
29   <div class="plain-header">
30   <span class="header">Advanced Options</span>
31   <span class="subheader"></span>
32   </div>
33   <div class="clear-div"></div>
34
35   <% fields_for 'quickvote', @quickvote do |quickform| %>
36
37     <p><label for="quickvote_election_method">Election Method</label></p>
38
39     <p><%= quickform.select('election_method', 
40         %w(ssd condorcet plurality approval borda) ) %></p>
41
42     <p><label for="quickvote_enddate">End Time</label></p>
43     <p><%= quickform.date_select(:enddate, :start_year => Time.now.year) %></p>
44
45     <p><label for="quickvote_visibility">Visibility</label></p>
46
47     <p>Do you want the results to be visible while the election is active?</p>
48
49     <p>Yes <%= quickform.radio_button(:viewable, 1)%>
50        No  <%= quickform.radio_button(:viewable, 0)%></p>
51
52     <% if session[:user] %>
53       <p>Notification</p>
54
55       <p>Would you like to be e-mailed when this QuickVote concludes?</p>
56
57       <p>Yes <%= quickform.radio_button(:notices, 1)%>
58          No  <%= quickform.radio_button(:notices, 0)%></p>
59     <% end -%>
60
61   <% end %>
62
63 </div>
64 <br />
65
66 <p><%= submit_tag "Create Quickvote" -%></p>
67
68 <% end %>
69

Benjamin Mako Hill || Want to submit a patch?