From 87542c0facc624560ae4925c429f527e3faaf56f Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Thu, 11 Dec 2014 17:00:55 +0100 Subject: [PATCH] Modifications on the ajax calls to gain compatibility --- .../include/ajax/double_auth.ajax.php | 8 ++++---- pandora_console/operation/users/user_edit.php | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pandora_console/include/ajax/double_auth.ajax.php b/pandora_console/include/ajax/double_auth.ajax.php index 770749e683..642ceb778a 100644 --- a/pandora_console/include/ajax/double_auth.ajax.php +++ b/pandora_console/include/ajax/double_auth.ajax.php @@ -225,7 +225,7 @@ if ($get_double_auth_info_page) { $("#"+containerID).html("/images/spinner.gif\" />"); $.ajax({ - url: 'ajax.php', + url: "", type: 'POST', dataType: 'html', data: { @@ -320,7 +320,7 @@ if ($get_double_auth_generation_page) { $("#"+containerID).html("/images/spinner.gif\" />"); $.ajax({ - url: 'ajax.php', + url: "", type: 'POST', dataType: 'html', data: { @@ -364,7 +364,7 @@ if ($get_double_auth_generation_page) { $("#"+containerID).html("/images/spinner.gif\" />"); $.ajax({ - url: 'ajax.php', + url: "", type: 'POST', dataType: 'html', data: { @@ -458,7 +458,7 @@ if ($get_double_auth_validation_page) { $("div#button-container").find("img").show(); $.ajax({ - url: 'ajax.php', + url: "", type: 'POST', dataType: 'json', data: { diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 3068cd3f9f..c3fa1f11b9 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -520,7 +520,7 @@ function show_double_auth_info () { // Load the info page var request = $.ajax({ - url: 'ajax.php', + url: "", type: 'POST', dataType: 'html', data: { @@ -539,14 +539,14 @@ function show_double_auth_info () { } // data is a number, convert it to integer to do the compare else if (Number(data) === -1) { - $dialogContainer.html(""); + $dialogContainer.html("
' . __('Authentication error') . '
'; ?>"); } else { - $dialogContainer.html(""); + $dialogContainer.html("
' . __('Error') . '
'; ?>"); } }, error: function(xhr, textStatus, errorThrown) { - $dialogContainer.html(""); + $dialogContainer.html("
' . __('There was an error loading the data') . '
'; ?>"); } }); @@ -585,7 +585,7 @@ function show_double_auth_activation () { // Load the info page var request = $.ajax({ - url: 'ajax.php', + url: "", type: 'POST', dataType: 'html', data: { @@ -604,14 +604,14 @@ function show_double_auth_activation () { } // data is a number, convert it to integer to do the compare else if (Number(data) === -1) { - $dialogContainer.html(""); + $dialogContainer.html("
' . __('Authentication error') . '
'; ?>"); } else { - $dialogContainer.html(""); + $dialogContainer.html("
' . __('Error') . '
'; ?>"); } }, error: function(xhr, textStatus, errorThrown) { - $dialogContainer.html(""); + $dialogContainer.html("
' . __('There was an error loading the data') . '
'; ?>"); } }); @@ -662,7 +662,7 @@ function show_double_auth_deactivation () { // Deactivate the double auth request = $.ajax({ - url: 'ajax.php', + url: "", type: 'POST', dataType: 'json', data: {