diff --git a/administrator/language/en-GB/plg_multifactorauth_totp.ini b/administrator/language/en-GB/plg_multifactorauth_totp.ini index 7de7c1c7aaf26..9bf8d7bd04b50 100644 --- a/administrator/language/en-GB/plg_multifactorauth_totp.ini +++ b/administrator/language/en-GB/plg_multifactorauth_totp.ini @@ -9,6 +9,7 @@ PLG_MULTIFACTORAUTH_TOTP_ERR_VALIDATIONFAILED="You did not enter a valid verific PLG_MULTIFACTORAUTH_TOTP_LBL_LABEL="Enter the six digit verification code" PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_INSTRUCTIONS="Set up your verification code (also known as an \"authenticator code\") using the information below. You can use an authenticator app (such Google Authenticator, Authy, LastPass Authenticator, etc), your favourite password manager (1Password, BitWarden, Keeper, KeePassXC, Strongbox, etc) or, in some cases, your browser." PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_PLACEHOLDER="Six Digit Code" +PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_QR_ALT="QR code for setting up your authenticator app." PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_TABLE_HEADING="Authenticator app setup" PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_TABLE_KEY="Enter this key" PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_TABLE_LINK="Click this link" diff --git a/media_source/plg_multifactorauth_totp/js/setup.es6.js b/media_source/plg_multifactorauth_totp/js/setup.es6.js index 62cf5d5218843..7b872e4062bde 100644 --- a/media_source/plg_multifactorauth_totp/js/setup.es6.js +++ b/media_source/plg_multifactorauth_totp/js/setup.es6.js @@ -20,6 +20,10 @@ const qr = qrcode(0, 'H'); qr.addData(qrData); qr.make(); - elTarget.innerHTML = qr.createImgTag(4); + elTarget.innerHTML = qr.createImgTag( + 4, + undefined, + Joomla.Text._('PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_QR_ALT'), + ); }); })(Joomla, document, qrcode); diff --git a/plugins/multifactorauth/totp/src/Extension/Totp.php b/plugins/multifactorauth/totp/src/Extension/Totp.php index d666917d7dfb7..6983089f95e41 100644 --- a/plugins/multifactorauth/totp/src/Extension/Totp.php +++ b/plugins/multifactorauth/totp/src/Extension/Totp.php @@ -195,6 +195,7 @@ public function onUserMultifactorGetSetup(GetSetup $event): void $wam = $document->getWebAssetManager(); $document->addScriptOptions('plg_multifactorauth_totp.totp.qr', $otpURL); + Text::script('PLG_MULTIFACTORAUTH_TOTP_LBL_SETUP_QR_ALT'); $wam->getRegistry()->addExtensionRegistryFile('plg_multifactorauth_totp'); $wam->useScript('plg_multifactorauth_totp.setup');