mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-26 10:21:14 +00:00
Keep anchor (i.e. to a specific issue note) throughout login (#21110).
Patch by Jens Krämer. git-svn-id: http://svn.redmine.org/redmine/trunk@14767 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f29aa17f1b
commit
27b65d53ac
@ -1,6 +1,6 @@
|
||||
<%= 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>
|
||||
|
||||
@ -651,6 +651,17 @@ $(document).ready(function(){
|
||||
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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user