features.
--- /dev/null
+class UserController < ApplicationController
+ layout 'vb'
+end
--- /dev/null
+module UserHelper
+end
<head>
<title><%= @page_title || "VotingBooth" %></title>
<%= stylesheet_link_tag "vb", :media => "all" %>
- <%= engine_stylesheet 'login_engine' %>
+ <% #engine_stylesheet 'login_engine' %>
<%= javascript_include_tag "prototype", "effects", "dragdrop", "controls" %>
</head>
--- /dev/null
+<% -%>
+ <%= start_form_tag :controller => 'user', :action => 'login' %>
+ <table>
+ <%= form_input :text_field, "Login ID", "login", :size => 30 %>
+ <%= form_input :password_field, "Password", "password", :size => 30 %>
+ </table>
+
+ <div class="button-bar">
+ <%= submit_tag 'Login' %>
+ <%= link_to 'Register for an account', :controller => 'user', :action => 'signup' %> |
+ <%= link_to 'Forgot my password', :controller => 'user', :action => 'forgot_password' %> </div>
+ <%= end_form_tag %>
<td width="47%" valign="top">
<h2>Voters</h2>
-<p>Please enter your password/token to log in and vote:</p>
+<p>If you have received an email with a token inviting you to vote in an
+ongoing election, you can log in to vote using your token here.</p>
<%= form_tag :controller => 'voter', :action => 'index' %>
<%= text_field :vote, :password %>
<%= submit_tag "Log In" %>
<%= end_form_tag %>
+
+<p><%= link_to 'Lost or forgot your token?', :controller => 'voter', :action => 'forgot_password' %></p>
</td>
<td width="6%"></td>
<td width="47%" valign="top">
<h2>Vote Administrators</h2>
-<%= render :controller => 'user', :action => 'login' %>
-hi!
+
+<p>You must have an account to start a new election or to administer an
+existing vote. You can log in or create a new account below.</p>
+
+<%= render_partial 'basic_login' %>
</td>
</tr>
</table>
--- /dev/null
+require File.dirname(__FILE__) + '/../test_helper'
+require 'user_controller'
+
+# Re-raise errors caught by the controller.
+class UserController; def rescue_action(e) raise e end; end
+
+class UserControllerTest < Test::Unit::TestCase
+ def setup
+ @controller = UserController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ end
+
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end