GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit d77806c3 authored by jplang's avatar jplang

Keep anchor (i.e. to a specific issue note) throughout login (#21110).

Patch by Jens Krämer.

git-svn-id: https://svn.redmine.org/redmine/trunk@14767 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent ccc53938
<%= 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment