diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index fd929d0d52..047d0b0925 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -1073,9 +1073,11 @@ if (!$new_user) { 'show_api_token', false, sprintf( - 'javascript:showAPIToken("%s", "%s")', + 'javascript:showAPIToken("%s", "%s", "%s", "%s")', __('API Token'), - base64_encode(__('Your API Token is:').' 
'.users_get_API_token($id).'
 '.__('Please, avoid share this string with others.')), + __('Your API Token is:'), + base64_encode(users_get_API_token($id)), + __('Please, avoid share this string with others.'), ), [ 'mode' => 'link', diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 22815792e0..3513df318b 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -2230,10 +2230,16 @@ function renewAPIToken(title, message, form) { * @param {string} title Title for show. * @param {string} message Base64 encoded message for show. */ -function showAPIToken(title, message) { +function showAPIToken(title, message_a, token, message_b) { + var message = + message_a + + ' 
' + + atob(token) + + "
 " + + message_b; confirmDialog({ title: title, - message: atob(message), + message: message, hideCancelButton: true }); }