]> git.proxmox.com Git - pve-manager.git/commitdiff
www: use render_u2f_error from wtk
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 9 Nov 2021 11:27:08 +0000 (12:27 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Nov 2021 13:38:23 +0000 (14:38 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
www/manager6/Utils.js
www/manager6/dc/TFAEdit.js
www/manager6/window/LoginWindow.js

index 2365a6503fd00e89a55ab2a5aab1c6859e04f789..bcd6383b91462f25911e7c58b4cc60d1e28a1b0f 100644 (file)
@@ -1302,17 +1302,6 @@ Ext.define('PVE.Utils', {
        return Ext.htmlEncode(first + " " + last);
     },
 
-    render_u2f_error: function(error) {
-       var ErrorNames = {
-           '1': gettext('Other Error'),
-           '2': gettext('Bad Request'),
-           '3': gettext('Configuration Unsupported'),
-           '4': gettext('Device Ineligible'),
-           '5': gettext('Timeout'),
-       };
-       return "U2F Error: " + ErrorNames[error] || Proxmox.Utils.unknownText;
-    },
-
     windowHostname: function() {
        return window.location.hostname.replace(Proxmox.Utils.IP6_bracket_match,
             function(m, addr, offset, original) { return addr; });
index 54e8d87f08daec2c0075b21586215d2550fb8c51..57a73b398b7d142aba6f23f2273a9a9fa5b20b9f 100644 (file)
@@ -44,7 +44,7 @@ Ext.define('PVE.window.TFAEdit', {
     showError: function(error) {
        Ext.Msg.alert(
            gettext('Error'),
-           PVE.Utils.render_u2f_error(error),
+           Proxmox.Utils.render_u2f_error(error),
        );
     },
 
index 2f23cbb5f305747d63916237c043feb10df378aa..ecd198a559872602a8552793c152324110c523c7 100644 (file)
@@ -151,7 +151,7 @@ Ext.define('PVE.window.LoginWindow', {
                msg.close();
                if (res.errorCode) {
                    Proxmox.Utils.authClear();
-                   Ext.Msg.alert(gettext('Error'), PVE.Utils.render_u2f_error(res.errorCode));
+                   Ext.Msg.alert(gettext('Error'), Proxmox.Utils.render_u2f_error(res.errorCode));
                    return;
                }
                delete res.errorCode;