parent
bc233420dd
commit
d15041f847
2 changed files with 27 additions and 42 deletions
|
@ -24,18 +24,4 @@ $(document).ready(function () {
|
||||||
// Hide OpenID field for now
|
// Hide OpenID field for now
|
||||||
$("#login_openid_url").hide();
|
$("#login_openid_url").hide();
|
||||||
$("#login_openid_submit").hide();
|
$("#login_openid_submit").hide();
|
||||||
|
|
||||||
// Handle OpenID submission by redirecting to omniauth
|
|
||||||
$("#openid_login_form").submit(function () {
|
|
||||||
var action = $(this).prop("action"),
|
|
||||||
openid_url = $(this).find("#openid_url").val(),
|
|
||||||
referer = $(this).find("#openid_referer").val(),
|
|
||||||
args = {};
|
|
||||||
args.openid_url = openid_url;
|
|
||||||
if (referer) {
|
|
||||||
args.referer = referer;
|
|
||||||
}
|
|
||||||
window.location = action + "?" + Qs.stringify(args);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
<%= f.primary t(".login_button"), :tabindex => 4 %>
|
<%= f.primary t(".login_button"), :tabindex => 4 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
|
|
||||||
<div id="loginForm" class="standard-form">
|
<div id="loginForm" class="standard-form">
|
||||||
|
|
||||||
<fieldset class='form-divider'>
|
<fieldset class='form-divider'>
|
||||||
|
@ -50,19 +49,19 @@
|
||||||
<li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
|
<li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<%= form_tag(auth_path(:provider => "openid"), :id => "openid_login_form") do %>
|
||||||
<div id='login_openid_url' class='standard-form-row'>
|
<div id='login_openid_url' class='standard-form-row'>
|
||||||
<label for='openid_url' class="standard-label"><%= t ".openid_html", :logo => openid_logo %></label>
|
<label for='openid_url' class="standard-label"><%= t ".openid_html", :logo => openid_logo %></label>
|
||||||
<%= hidden_field_tag("openid_referer", params[:referer]) if params[:referer] %>
|
<%= hidden_field_tag("referer", params[:referer]) %>
|
||||||
<%= text_field_tag("openid_url", "", :tabindex => 3, :class => "openid_url") %>
|
<%= text_field_tag("openid_url", "", :tabindex => 3, :class => "openid_url") %>
|
||||||
<span class="minorNote">(<a href="<%= t "users.account.openid.link" %>" target="_new"><%= t "users.account.openid.link text" %></a>)</span>
|
<span class="minorNote">(<a href="<%= t "users.account.openid.link" %>" target="_new"><%= t "users.account.openid.link text" %></a>)</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= submit_tag t(".login_button"), :tabindex => 6, :id => "login_openid_submit" %>
|
<%= submit_tag t(".login_button"), :tabindex => 6, :id => "login_openid_submit" %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue