mirror of
https://github.com/redmine/redmine.git
synced 2026-05-09 00:37:29 +02: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user