Commit 4e3e2ec7 by Don Mitchell

If user was trying to get to a specific page but had to log in, let them

get to that page once they've logged in.
parent 3450c728
......@@ -77,7 +77,11 @@
submit_data,
function(json) {
if(json.success) {
location.href = "${reverse('homepage')}";
var next = /next=([^&]*)/g.exec(decodeURIComponent(window.location.search));
if (next.length > 1) {
location.href = next[1];
}
else location.href = "${reverse('homepage')}";
} else if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error" class="message message-status error">' + json.value + '</span></div>');
$('#login_error').addClass('is-shown');
......
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