aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-03-11 20:40:32 +0000
committerMario <mario@mariovavti.com>2023-03-11 20:40:32 +0000
commit5fada6a497ad5123668f282deb508db00e628bda (patch)
tree8f43705d1a5bb345df1c17dbad5ce4afd6c98c17
parentac9c33fb3b31f4a3801fbdf7c723b923d699964d (diff)
downloadvolse-hubzilla-5fada6a497ad5123668f282deb508db00e628bda.tar.gz
volse-hubzilla-5fada6a497ad5123668f282deb508db00e628bda.tar.bz2
volse-hubzilla-5fada6a497ad5123668f282deb508db00e628bda.zip
more strings and provide mfa feedback via jgrowl
-rw-r--r--Zotlabs/Module/Settings/Multifactor.php8
-rw-r--r--util/hmessages.po47
-rw-r--r--view/tpl/totp_setup.tpl12
3 files changed, 38 insertions, 29 deletions
diff --git a/Zotlabs/Module/Settings/Multifactor.php b/Zotlabs/Module/Settings/Multifactor.php
index 4df718c6a..8b91bc87a 100644
--- a/Zotlabs/Module/Settings/Multifactor.php
+++ b/Zotlabs/Module/Settings/Multifactor.php
@@ -72,16 +72,16 @@ class Multifactor {
'$qrcode' => (new QRCode())->render($uri),
'$uri' => $uri,
'$secret' => ($account['account_external'] ?? ''),
- '$test_pass' => t("That code is correct."),
- '$test_fail' => t("Incorrect code."),
+ '$test_pass' => t("Congratulations, the provided code was correct"),
+ '$test_fail' => t("Incorrect code"),
'$enable_mfa' => [
'enable_mfa',
t('Enable Multi-Factor Authentication'),
AConfig::Get($account['account_id'], 'system', 'mfa_enabled'),
- t('Logging in will require you to be in possession of your smartphone with an authenticator app'),
+ t('Logging in will require you to be in possession of your smartphone'),
[t('No'), t('Yes')]
],
- '$password' => ['password', t('Please enter your password'), '', t('Required')],
+ '$password' => ['password', t('Your account password'), '', t('Required')],
'$submit' => t('Submit'),
'$test' => t('Test')
]
diff --git a/util/hmessages.po b/util/hmessages.po
index f48170fea..9fa7b139c 100644
--- a/util/hmessages.po
+++ b/util/hmessages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 8.2RC1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2023-03-11 19:33+0000\n"
+"POT-Creation-Date: 2023-03-11 20:39+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -113,7 +113,7 @@ msgstr ""
#: ../../Zotlabs/Module/Settings/Manage.php:43
#: ../../Zotlabs/Module/Settings/Channel_home.php:91
#: ../../Zotlabs/Module/Settings/Calendar.php:42
-#: ../../Zotlabs/Module/Settings/Multifactor.php:70
+#: ../../Zotlabs/Module/Settings/Multifactor.php:85
#: ../../Zotlabs/Module/Settings/Display.php:186
#: ../../Zotlabs/Module/Settings/Directory.php:42
#: ../../Zotlabs/Module/Settings/Editor.php:42
@@ -213,7 +213,7 @@ msgstr ""
#: ../../Zotlabs/Module/Profiles.php:686 ../../Zotlabs/Module/Profiles.php:694
#: ../../Zotlabs/Module/Profiles.php:698
#: ../../Zotlabs/Module/Settings/Channel.php:224
-#: ../../Zotlabs/Module/Settings/Multifactor.php:68
+#: ../../Zotlabs/Module/Settings/Multifactor.php:82
#: ../../Zotlabs/Module/Settings/Display.php:86
#: ../../Zotlabs/Module/Settings/Privacy.php:120
#: ../../Zotlabs/Module/Settings/Privacy.php:121
@@ -290,7 +290,7 @@ msgstr ""
#: ../../Zotlabs/Module/Profiles.php:686 ../../Zotlabs/Module/Profiles.php:694
#: ../../Zotlabs/Module/Profiles.php:698
#: ../../Zotlabs/Module/Settings/Channel.php:224
-#: ../../Zotlabs/Module/Settings/Multifactor.php:68
+#: ../../Zotlabs/Module/Settings/Multifactor.php:82
#: ../../Zotlabs/Module/Settings/Display.php:86
#: ../../Zotlabs/Module/Settings/Privacy.php:120
#: ../../Zotlabs/Module/Settings/Privacy.php:121
@@ -2125,7 +2125,7 @@ msgid ""
msgstr ""
#: ../../addon/totp_bak/Settings/Totp.php:101
-#: ../../Zotlabs/Module/Settings/Multifactor.php:71
+#: ../../Zotlabs/Module/Settings/Multifactor.php:86
msgid "Test"
msgstr ""
@@ -2991,6 +2991,7 @@ msgstr ""
#: ../../Zotlabs/Module/Register.php:498 ../../Zotlabs/Module/Appman.php:208
#: ../../Zotlabs/Module/Appman.php:209 ../../Zotlabs/Module/Profiles.php:762
#: ../../Zotlabs/Module/Profiles.php:766
+#: ../../Zotlabs/Module/Settings/Multifactor.php:84
msgid "Required"
msgstr ""
@@ -13714,40 +13715,50 @@ msgstr ""
msgid "Calendar Settings"
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:54
+#: ../../Zotlabs/Module/Settings/Multifactor.php:23
+msgid "Password is required"
+msgstr ""
+
+#: ../../Zotlabs/Module/Settings/Multifactor.php:29
+msgid "The provided password is not correct"
+msgstr ""
+
+#: ../../Zotlabs/Module/Settings/Multifactor.php:68
msgid "Account Multi-Factor Authentication"
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:55
+#: ../../Zotlabs/Module/Settings/Multifactor.php:69
msgid ""
"This is your generated secret. It may be used in some cases if the QR image "
"cannot be read. Please store it in a safe place."
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:56
+#: ../../Zotlabs/Module/Settings/Multifactor.php:70
msgid "Please enter the code from your authenticator app"
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:57
+#: ../../Zotlabs/Module/Settings/Multifactor.php:71
msgid "You will only be able to enable MFA if the test passes"
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:61
-msgid "That code is correct."
+#: ../../Zotlabs/Module/Settings/Multifactor.php:75
+msgid "Congratulations, the provided code was correct"
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:62
-msgid "Incorrect code."
+#: ../../Zotlabs/Module/Settings/Multifactor.php:76
+msgid "Incorrect code"
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:65
+#: ../../Zotlabs/Module/Settings/Multifactor.php:79
msgid "Enable Multi-Factor Authentication"
msgstr ""
-#: ../../Zotlabs/Module/Settings/Multifactor.php:67
-msgid ""
-"Logging in will require you to be in possession of your smartphone with an "
-"authenticator app"
+#: ../../Zotlabs/Module/Settings/Multifactor.php:81
+msgid "Logging in will require you to be in possession of your smartphone"
+msgstr ""
+
+#: ../../Zotlabs/Module/Settings/Multifactor.php:84
+msgid "Your account password"
msgstr ""
#: ../../Zotlabs/Module/Settings/Display.php:125
diff --git a/view/tpl/totp_setup.tpl b/view/tpl/totp_setup.tpl
index 1301d0001..6f995edf1 100644
--- a/view/tpl/totp_setup.tpl
+++ b/view/tpl/totp_setup.tpl
@@ -20,9 +20,6 @@
<button id="otp-test-submit" type="submit" name="submit" class="btn btn-outline-primary" onclick="totp_test_code(); return false;">
{{$test}}
</button>
- <div class="">
- <strong id="otptest_results"></strong>
- </div>
</form>
</div>
<div id="mfa-submit-wrapper" class="{{if !$enable_mfa.2}}d-none{{/if}}">
@@ -42,10 +39,9 @@
<script>
function totp_clear_code() {
- let box = document.getElementById("totp_test");
- box.value = "";
+ let box = document.getElementById('totp_test');
+ box.value = '';
box.focus();
- document.getElementById("otptest_results").innerHTML = "";
}
function totp_test_code() {
@@ -53,11 +49,13 @@
'totp_check',
{totp_code: document.getElementById('totp_test').value},
function(data) {
- document.getElementById("otptest_results").innerHTML = data['status'] ? '{{$test_pass}}' : '{{$test_fail}}';
if (data['status']) {
+ $.jGrowl('{{$test_pass}}', { sticky: false, theme: 'info', life: 10000 });
let e = document.getElementById('mfa-submit-wrapper');
e.classList.remove('d-none');
+ return;
}
+ $.jGrowl('{{$test_fail}}', { sticky: false, theme: 'notice', life: 10000 });
}
);
}