Moved files around a bit more.
[selectricity] / app / views / quickvote / create.rhtml
index 0a5d4aab1bb144f684403e6901adddda6c6b1dca..57df1ed24970a7bd9d9b182190ca404cc2047aef 100644 (file)
@@ -1,47 +1,42 @@
-<% -%>
-<h1><%= @quickvote ? "Review and Confirm" : "Create QuickVote" %></h1>
+<h2>Create QuickVote</h2>
 
 <%= error_messages_for 'quickvote' %>
 
-<% if @quickvote %>
+<h3><label for="quickvote_candidate_names">Choices</h3>
 
-<p>Please review the data you've entered and confirm it. The candidates
-for the vote you've submitted include:</p>
+<!-- the list of candidates -->
+<div id="candidate_names">
+<%= render :partial => 'candidate_list' %>
+</div>
 
-<ul>
-<% for candidate in @quickvote.raw_candidates %>
-  <li><%= candidate.capitalize %></li>
-<% end %>
-</ul>
-
-<% end %>
-
-<%= form_tag :action => 'create' %>
+<% form_tag(:action => 'create') do %>
 <!--[form:election]-->
 
-<p><label for="quickvote_name">Super-short name (for URL)<br />
+<h3><label for="quickvote_name">One Word Description (for URL)</label></h3>
+
+<p><em><font size="-1">required; 5-12 characters; only letters and numbers; no spaces</font></em></p>
 
-<em><font size="-1">required; 5-12 characters; only letters and numbers; no spaces</font></em></label><br/>
+<p><%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12  %></p>
 
-<%= text_field 'quickvote', 'name', :size => 15, :maxsize => 12  %></p>
+<h3><label for="quickvote_description">Description</label></h3>
 
-<p><label for="quickvote_description">Description<em><br />
-<font size="-1">optional; one line summary on the first line</font></em></label><br/>
+<p><font size="-1">required; one line summary on the first line</font></em><br/>
 
 <%= text_area 'quickvote', 'description', :cols => 50, :rows => 4 %></p>
 
-<p><label for="quickvote_candidatelist">Choices/Candidates<em><br />
-<font size="-1">seperate choices with a ";"; at least two are required</font></em></label><br/>
+<%= check_box('options', 'advanced', 
+    :onclick => 'Element.toggle($("advanced")); false;' )%>Advanced
+
+<div id="advanced" style="display: none">
+<%= render :partial => 'advanced', :locals => {:quickvote => @quickvote} %>
+</div>
+<br />
+
+<p><%= submit_tag "Create Quickvote" -%></p>
+
+<% end %>
+
 
-<%= text_area 'quickvote', 'candidatelist', :cols => 50, :rows => 2 %></p>
 
-<p><% if @quickvote -%>
-     <%= submit_tag "Confirm" -%>
-     <%= hidden_field :quickvote, :reviewed, :value => 1 %>
-   <% else %>
-     <%= submit_tag "Submit" -%>
-   <%- end -%>
-</p>
 
-<%= end_form_tag %>
 

Benjamin Mako Hill || Want to submit a patch?