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 for="username" 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 for="password" 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 <% if defined?(GOOGLE_AUTH_ID) -%>
46 <li><%= auth_button "google", "google" %></li>
48 <% if defined?(FACEBOOK_AUTH_ID) -%>
49 <li><%= auth_button "facebook", "facebook" %></li>
51 <li><%= auth_button "yahoo", "openid", :openid_url => "yahoo.com" %></li>
52 <li><%= auth_button "wordpress", "openid", :openid_url => "wordpress.com" %></li>
53 <li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
56 <div id='login_openid_url' class='form-row'>
57 <label for='openid_url' class="standard-label"><%= raw t 'user.login.openid', :logo => openid_logo %></label>
58 <%= text_field_tag("openid_url", "", { :tabindex => 3, :class => "openid_url" }) %>
59 <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span>
62 <div class='form-row'>
63 <%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %>
64 <label class="standard-label" for="remember_me_openid"><%= t 'user.login.remember' %></label>
67 <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %>
77 <script type="text/javascript">
78 $(document).ready(function() {
79 // Preserve location hash in referer
80 if (window.location.hash) {
81 $('#referer').val($('#referer').val() + window.location.hash);
84 $("#openid_open_url").click(function() {
85 $("#openid_url").val("http://");
86 $("#login_auth_buttons").hide();
87 $("#login_openid_url").show();
88 $("#login_openid_submit").show();
91 $("#login_openid_url").hide();
92 $("#login_openid_submit").hide();