|
|
|
@ -35,8 +35,14 @@ define('forum/login', [], function () {
|
|
|
|
|
headers: {
|
|
|
|
|
'x-csrf-token': config.csrf_token,
|
|
|
|
|
},
|
|
|
|
|
success: function (data) {
|
|
|
|
|
window.location.href = data + '?loggedin';
|
|
|
|
|
success: function (returnTo) {
|
|
|
|
|
var pathname = utils.urlToLocation(returnTo).pathname;
|
|
|
|
|
|
|
|
|
|
var params = utils.params({ url: returnTo });
|
|
|
|
|
params.loggedin = true;
|
|
|
|
|
var qs = decodeURIComponent($.param(params));
|
|
|
|
|
|
|
|
|
|
window.location.href = pathname + '?' + qs;
|
|
|
|
|
},
|
|
|
|
|
error: function (data) {
|
|
|
|
|
if (data.status === 403 && data.responseText === 'Forbidden') {
|
|
|
|
|