If there's a ?next param, redirect there instead of dashboard after login
This commit is contained in:
@@ -46,7 +46,11 @@
|
||||
(function() {
|
||||
$(document).delegate('#login_form', 'ajax:success', function(data, json, xhr) {
|
||||
if(json.success) {
|
||||
location.href="${reverse('dashboard')}";
|
||||
% if request.REQUEST.get('next', False):
|
||||
location.href="${request.REQUEST.get('next')}";
|
||||
% else:
|
||||
location.href="${reverse('dashboard')}";
|
||||
% endif
|
||||
} else {
|
||||
if($('#login_error').length == 0) {
|
||||
$('#login_form').prepend('<div id="login_error" class="modal-form-error"></div>');
|
||||
|
||||
Reference in New Issue
Block a user