Patch by Jens Krämer.
git-svn-id: http://svn.redmine.org/redmine/trunk@14767
e93f8b46-1217-0410-a6f0-
8f06a7374b81
<%= 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>
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);