2 <% content_for :heading do %>
3 <h1><%= t 'user.login.heading' %></h1>
6 <%= form_tag({ :action => "login" }, { :id => "login_form" }) do %>
7 <%= hidden_field_tag('referer', h(params[:referer])) %>
9 <p class='deemphasize'><%= t 'user.login.no account' %> <%= link_to t('user.login.register now'), :action => :new, :referer => params[:referer] %></p>
11 <div id="loginForm" class="standard-form">
14 <div class="form-row">
15 <label class="standard-label">
16 <%= t 'user.login.email or username' %>
18 <%= text_field_tag "username", params[:username], :tabindex => 1 %>
20 <div class="form-row">
21 <label class="standard-label">
22 <%= t 'user.login.password' %>
24 <%= password_field_tag "password", "", :tabindex => 2 %>
26 <span class="form-help deemphasize">
27 <%= link_to t('user.login.lost password link'), :controller => 'user', :action => 'lost_password' %>
32 <%= check_box_tag "remember_me", "yes", false, :tabindex => 3 %>
33 <label for="remember_me" class="standard-label">
34 <%= t 'user.login.remember' %>
36 <%= submit_tag t('user.login.login_button'), :tabindex => 4 %>
39 <fieldset class='form-divider'>
41 <p class='standard-label'><%= t 'user.login.with external' %></p>
43 <ul class='clearfix' id="login_auth_buttons">
44 <li><%= link_to image_tag("openid.png", :alt => t("user.login.auth_providers.openid.title")), "#", :id => "openid_open_url", :title => t("user.login.auth_providers.openid.title") %></li>
45 <li><%= auth_button "google", "openid", :openid_url => "https://www.google.com/accounts/o8/id" %></li>
46 <li><%= auth_button "yahoo", "openid", :openid_url => "yahoo.com" %></li>
47 <li><%= auth_button "wordpress", "openid", :openid_url => "wordpress.com" %></li>
48 <li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
51 <div id='login_openid_url' class='form-row'>
52 <label class="standard-label"><%= raw t 'user.login.openid', :logo => openid_logo %></label>
53 <%= text_field_tag("openid_url", "", { :tabindex => 3, :class => "openid_url" }) %>
54 <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span>
57 <div class='form-row'>
58 <%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %>
59 <label class="standard-label" for="remember_me_openid"><%= t 'user.login.remember' %></label>
62 <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %>
72 <script type="text/javascript">
73 $(document).ready(function() {
74 // Preserve location hash in referer
75 if (window.location.hash) {
76 $('#referer').val($('#referer').val() + window.location.hash);
79 $("#openid_open_url").click(function() {
80 $("#openid_url").val("http://");
81 $("#login_auth_buttons").hide();
82 $("#login_openid_url").show();
83 $("#login_openid_submit").show();
86 $("#login_openid_url").hide();
87 $("#login_openid_submit").hide();