Merge branch 'ent-11347-15666-mensaje-del-visor-de-tokens-de-api-tiene-mojibake' into 'develop'

Ent 11347 15666 mensaje del visor de tokens de api tiene mojibake

See merge request artica/pandorafms!6084
This commit is contained in:
Rafael Ameijeiras 2023-06-26 07:36:22 +00:00
commit a3ef14c50b
2 changed files with 12 additions and 4 deletions

View File

@ -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:').'&nbsp;<br><span class="font_12pt bolder">'.users_get_API_token($id).'</span><br>&nbsp;'.__('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',

View File

@ -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 +
'&nbsp;<br><span class="font_12pt bolder">' +
atob(token) +
"</span><br>&nbsp;" +
message_b;
confirmDialog({
title: title,
message: atob(message),
message: message,
hideCancelButton: true
});
}