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.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user