Skip to content
Snippets Groups Projects
Commit 706d1c47 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[ui] Fix redirection when doing error processing

parent f83ba4e3
No related branches found
No related tags found
1 merge request!209Issue 425
/*
* Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/
* Contact: beat.support@idiap.ch
*
*
* This file is part of the beat.web module of the BEAT platform.
*
*
* Commercial License Usage
* Licensees holding valid commercial BEAT licenses may use this file in
* accordance with the terms contained in a written agreement between you
* and Idiap. For further information contact tto@idiap.ch
*
*
* Alternatively, this file may be used under the terms of the GNU Affero
* Public License version 3 as published by the Free Software and appearing
* in the file LICENSE.AGPL included in the packaging of this file.
* The BEAT platform is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE.
*
*
* You should have received a copy of the GNU Affero Public License along
* with the BEAT platform. If not, see http://www.gnu.org/licenses/.
*/
......@@ -131,8 +131,8 @@ function process_error(data, status_text, redirect) {
type: BootstrapDialog.TYPE_DANGER,
title: 'Error during submission' + ' - ' + data.statusText + ' (' + data.status + ')',
message: div,
onhidden: function() {
if (redirect !== undefined) window.location = redirect;
callback: function(result) {
if (redirect !== undefined) window.location.href = redirect;
}
});
}
......@@ -142,8 +142,8 @@ function process_error(data, status_text, redirect) {
message: 'An empty response was received by your browser, for a request you sent. This normally indicates it cannot establish a connection with the web service. In the hopes it is a temporary issue, you may re-submit your request again at a later moment. Otherwise, please contact the system administrators.',
type: BootstrapDialog.TYPE_DANGER,
title: 'Empty response',
onhidden: function() {
if (redirect !== undefined) window.location = redirect;
callback: function(result) {
if (redirect !== undefined) window.location.href = redirect;
}
});
}
......@@ -152,8 +152,8 @@ function process_error(data, status_text, redirect) {
message: data.responseJSON,
type: BootstrapDialog.TYPE_DANGER,
title: data.statusText + ' (' + data.status + ')',
onhidden: function() {
if (redirect !== undefined) window.location = redirect;
callback: function(result) {
if (redirect !== undefined) window.location.href = redirect;
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment