X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/ac5e3489e8b886b7b8a7252ab56ddeb3d3bdadc7..2857ac6197adfe972a5e6129a3f26af9e148edb1:/app/views/quickvote/create.rhtml
diff --git a/app/views/quickvote/create.rhtml b/app/views/quickvote/create.rhtml
index 0a5d4aa..94081e6 100644
--- a/app/views/quickvote/create.rhtml
+++ b/app/views/quickvote/create.rhtml
@@ -1,47 +1,69 @@
-<% -%>
-
<%= @quickvote ? "Review and Confirm" : "Create QuickVote" %>
+
-<%= error_messages_for 'quickvote' %>
+
-<% if @quickvote %>
+
+
+<%= render :partial => 'candidate_list' %>
+
-Please review the data you've entered and confirm it. The candidates
-for the vote you've submitted include:
+<% form_tag(:action => 'create') do %>
+
+
-
-<% for candidate in @quickvote.raw_candidates %>
- - <%= candidate.capitalize %>
-<% end %>
-
+required; 5-12 characters; only letters and numbers; no spaces
-<% end %>
+<%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12 %>
-<%= form_tag :action => 'create' %>
-
+
+
+required; free-form
+
+<%= text_field 'quickvote', 'description', :size => 50 %>
+
+
+
+
-
+
-<%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12 %>
+
<%= quickform.select('election_method',
+ %w(ssd condorcet plurality approval borda) ) %>
-
+
+
<%= quickform.date_select(:enddate, :start_year => Time.now.year) %>
-<%= text_area 'quickvote', 'description', :cols => 50, :rows => 4 %>
+
-
+
Do you want the results to be visible while the election is active?
-<%= text_area 'quickvote', 'candidatelist', :cols => 50, :rows => 2 %>
+
Yes <%= quickform.radio_button(:viewable, 1)%>
+ No <%= quickform.radio_button(:viewable, 0)%>
-
<% if @quickvote -%>
- <%= submit_tag "Confirm" -%>
- <%= hidden_field :quickvote, :reviewed, :value => 1 %>
- <% else %>
- <%= submit_tag "Submit" -%>
- <%- end -%>
-
+ <% if session[:user] %>
+
Notification
-<%= end_form_tag %>
+
Would you like to be e-mailed when this QuickVote concludes?
+
+
Yes <%= quickform.radio_button(:notices, 1)%>
+ No <%= quickform.radio_button(:notices, 0)%>
+ <% end -%>
+
+ <% end %>
+
+
+
+
+<%= submit_tag "Create Quickvote" -%>
+
+<% end %>