1 <div id="title-header">
2 <span class="header">Quickvote</span>
3 <span class="subheader">Create New QuickVote</span>
6 <p><label for="quickvote_candidate_names">Choices</p>
8 <!-- the list of candidates -->
9 <div id="candidate_names">
10 <%= render :partial => 'candidate_list' %>
13 <% form_tag(:action => 'create') do %>
14 <!--[form:election]-->
15 <p><label for="quickvote_name">One Word Description (for URL)</label></p>
17 <p>required; 5-12 characters; only letters and numbers; no spaces</p>
19 <p><%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12 %></p>
21 <p><label for="quickvote_description">Description</label></p>
23 <p><font size="-1">required; free-form</font></em><br/>
25 <%= text_field 'quickvote', 'description', :size => 50 %></p>
27 <div id="advanced" style="display: none">
28 <div class="normal-header">
29 <span class="header">Advanced Options</span>
30 <span class="subheader"></span>
32 <div class="clear-div"></div>
34 <% fields_for 'quickvote', @quickvote do |quickform| %>
36 <p><label for="quickvote_election_method">Election Method</label></p>
39 <% type_hash = {}; ELECTION_TYPES.each {|k,v| type_hash[v] = k} %>
40 <%= select_tag 'election_election_method', options_for_select(type_hash, @quickvote.election_method) %></p>
42 <p><%= quickform.select('election_method',
43 %w(ssd condorcet plurality approval borda) ) %></p>
45 <p><label for="quickvote_enddate">End Time</label></p>
46 <p><%= quickform.date_select(:enddate, :start_year => Time.now.year) %></p>
48 <p><label for="quickvote_visibility">Visibility</label></p>
50 <p>Do you want the results to be visible while the election is active?</p>
52 <p>Yes <%= quickform.radio_button(:viewable, 1)%>
53 No <%= quickform.radio_button(:viewable, 0)%></p>
55 <% if session[:user] %>
58 <p>Would you like to be e-mailed when this QuickVote concludes?</p>
60 <p>Yes <%= quickform.radio_button(:notices, 1)%>
61 No <%= quickform.radio_button(:notices, 0)%></p>
69 <p><%= submit_tag "Create Quickvote" -%></p>