Patch #21110 » keep_anchor_on_signin.diff
| app/views/account/login.html.erb | ||
|---|---|---|
|
<%= call_hook :view_account_login_top %>
|
||
|
<div id="login-form">
|
||
|
<%= form_tag(signin_path) do %>
|
||
|
<%= form_tag(signin_path, onsubmit: 'return keepAnchorOnSignIn(this);') do %>
|
||
|
<%= back_url_hidden_field_tag %>
|
||
|
<table>
|
||
|
<tr>
|
||
| public/javascripts/application.js | ||
|---|---|---|
|
toggleDisabledInit();
|
||
|
});
|
||
|
function keepAnchorOnSignIn(form){
|
||
|
var hash = decodeURIComponent(self.document.location.hash);
|
||
|
if (hash) {
|
||
|
if (hash.indexOf("#") === -1) {
|
||
|
hash = "#" + hash;
|
||
|
}
|
||
|
form.action = form.action + hash;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
$(document).ready(setupAjaxIndicator);
|
||
|
$(document).ready(hideOnLoad);
|
||
|
$(document).ready(addFormObserversForDoubleSubmit);
|
||