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 openid' %></p>
43 <ul class='clearfix' id="login_openid_buttons">
44 <li><%= link_to image_tag("openid.png", :alt => t("user.login.openid_providers.openid.title")), "#", :id => "openid_open_url", :title => t("user.login.openid_providers.openid.title") %></li>
45 <li><%= openid_button "google", "gmail.com" %></li>
46 <li><%= openid_button "yahoo", "me.yahoo.com" %></li>
47 <li><%= openid_button "myopenid", "myopenid.com" %></li>
48 <li><%= openid_button "wordpress", "wordpress.com" %></li>
49 <li><%= openid_button "aol", "aol.com" %></li>
52 <div id='login_openid_url' class='form-row'>
53 <label class="standard-label"><%= raw t 'user.login.openid', :logo => openid_logo %></label>
54 <%= url_field_tag("openid_url", "", { :tabindex => 3, :class => "openid_url" }) %>
55 <span class="minorNote">(<a href="<%= t 'user.account.openid.link' %>" target="_new"><%= t 'user.account.openid.link text' %></a>)</span>
58 <div id="remember_me_openid" class='form-row'>
59 <%= check_box_tag "remember_me_openid", "yes", false, :tabindex => 5 %>
60 <label class="standard-label" for="remember_me_openid"><%= t 'user.login.remember' %></label>
63 <%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %>
73 <script type="text/javascript">
74 $(document).ready(function() {
75 // Preserve location hash in referer
76 if (window.location.hash) {
77 $('#referer').val($('#referer').val() + window.location.hash);
80 $("#openid_open_url").click(function() {
81 $("#openid_url").val("http://");
82 $("#login_openid_buttons").hide();
83 $("#login_openid_url").show();
84 $("#login_openid_submit").show();
87 $(".openid_button").click(function() {
88 $("#openid_url").val($(this).attr("data-url"));
89 $("#login_form").submit();
92 $("#login_openid_url").hide();
93 $("#login_openid_submit").hide();