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

Benjamin Mako Hill || Want to submit a patch?