From adb8a84fb483d0c5acabb349a5a03bba065ee126 Mon Sep 17 00:00:00 2001 From: Eduardo Robles Elvira Date: Mon, 13 Nov 2023 06:36:07 +0100 Subject: [PATCH] WIP --- avRegistration/login-directive/login-directive.js | 3 +-- dist/appCommon-v10.0.2.js | 4 ++-- dist/locales/en.json | 15 +++++++++++++++ locales/en.json | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/avRegistration/login-directive/login-directive.js b/avRegistration/login-directive/login-directive.js index 9fe8a1b5..9f017efa 100644 --- a/avRegistration/login-directive/login-directive.js +++ b/avRegistration/login-directive/login-directive.js @@ -22,7 +22,6 @@ angular.module('avRegistration') Authmethod, StateDataService, $state, - $stateParams, $location, $cookies, $i18next, @@ -720,7 +719,7 @@ angular.module('avRegistration') var codename = response.data.error_codename; setError( - "codename", + codename, $i18next( 'avRegistration.loginError.' + scope.method + '.' + codename, {support: '' + ConfigService.contact.email + ""} diff --git a/dist/appCommon-v10.0.2.js b/dist/appCommon-v10.0.2.js index 0ec4539b..232ce36d 100644 --- a/dist/appCommon-v10.0.2.js +++ b/dist/appCommon-v10.0.2.js @@ -445,7 +445,7 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist $scope.withCode = $stateParams.withCode, $scope.withAltMethod = $stateParams.withAltMethod, $scope.selectedAltMethod = $stateParams.altmethod, $scope.isOtl = $stateParams.isOtl, $scope.otlSecret = $stateParams.otlSecret; -} ]), angular.module("avRegistration").directive("avLogin", [ "Authmethod", "StateDataService", "$state", "$stateParams", "$location", "$cookies", "$i18next", "$window", "$timeout", "ConfigService", "Patterns", function(Authmethod, StateDataService, $state, $stateParams, $location, $cookies, $i18next, $window, $timeout, ConfigService, Patterns) { +} ]), angular.module("avRegistration").directive("avLogin", [ "Authmethod", "StateDataService", "$state", "$location", "$cookies", "$i18next", "$window", "$timeout", "ConfigService", "Patterns", function(Authmethod, StateDataService, $state, $location, $cookies, $i18next, $window, $timeout, ConfigService, Patterns) { return { restrict: "AE", scope: !0, @@ -629,7 +629,7 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist }, function(codename) { scope.sendingData = !1; codename = codename.data.error_codename; - setError("codename", $i18next("avRegistration.loginError." + scope.method + "." + codename, { + setError(codename, $i18next("avRegistration.loginError." + scope.method + "." + codename, { support: '' + ConfigService.contact.email + "" })); }); diff --git a/dist/locales/en.json b/dist/locales/en.json index 59325b64..a795eb65 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -61,6 +61,21 @@ "CANT_AUTHENTICATE_TO_PARENT": "You are trying to authenticate to the wrong election. Please authenticate the parent election.

If you think this is an error, please contact support at __support__.

", "INVALID_USER_CREDENTIALS": "Invalid User Credentials.There are multiple reasons why this can happen:

Please review your credentials and try again.

If you think this is an error, please contact support at __support__.

" }, + "openid-connect": { + "invalidCsrf": "There was an error during authentication: Invalid CSRF Token.

Please try again later. If the problem persists, please contact support at __support__.

", + "unexpectedOIDCRedirect": "There was an error during authentication: Unexpected OpenID Redirect.

Please try again later. If the problem persists, please contact support at __support__.

", + "unrecognizedServerResponse": "There was an error during authentication: Unrecognized Server Response.

Please try again later. If the problem persists, please contact support at __support__.

", + "invalidServerResponse": "There was an error during authentication: Invalid Server Response.

Please try again later. If the problem persists, please contact support at __support__.

", + "INTERNAL_SERVER_ERROR": "There was an error during authentication: Internal Server Error.

Please try again later. If the problem persists, please contact support at __support__.

", + "BAD_REQUEST": "There was an error during authentication: Bad Request.

Please try again later. If the problem persists, please contact support at __support__.

", + "INVALID_REQUEST": "There was an error during authentication: Invalid Request.

Please try again later. If the problem persists, please contact support at __support__.

", + "GENERAL_ERROR": "There was an error during authentication: General Error.

Please try again later. If the problem persists, please contact support at __support__.

", + "AUTH_EVENT_NOT_FOUND": "The election in which you are trying to authenticate was not found.

Please review you have the correct link. If the problem persists, please contact support at __support__.

", + "AUTH_EVENT_NOT_STARTED": "The voting period of the election is not open. It might be temporarely paused, stopped or not yet opened.

Please review and try again later. If the problem persists, please contact support at __support__.

", + "CANT_VOTE_MORE_TIMES": "Your authentication was successful, but we have already recorded a vote from you and you can't vote more times.

If you think this is an error, please contact support at __support__.

", + "CANT_AUTHENTICATE_TO_PARENT": "You are trying to authenticate to the wrong election. Please authenticate the parent election.

If you think this is an error, please contact support at __support__.

", + "INVALID_USER_CREDENTIALS": "Invalid User Credentials.There are multiple reasons why this can happen:

Please review your credentials and try again.

If you think this is an error, please contact support at __support__.

" + }, "email-and-password": { "unrecognizedServerResponse": "There was an error during authentication: Unrecognized Server Response.

Please try again later. If the problem persists, please contact support at __support__.

", "invalidServerResponse": "There was an error during authentication: Invalid Server Response.

Please try again later. If the problem persists, please contact support at __support__.

", diff --git a/locales/en.json b/locales/en.json index d55ba672..5784f1bc 100644 --- a/locales/en.json +++ b/locales/en.json @@ -62,6 +62,21 @@ "CANT_AUTHENTICATE_TO_PARENT": "You are trying to authenticate to the wrong election. Please authenticate the parent election.

If you think this is an error, please contact support at __support__.

", "INVALID_USER_CREDENTIALS": "Invalid User Credentials.There are multiple reasons why this can happen:

Please review your credentials and try again.

If you think this is an error, please contact support at __support__.

" }, + "openid-connect": { + "invalidCsrf": "There was an error during authentication: Invalid CSRF Token.

Please try again later. If the problem persists, please contact support at __support__.

", + "unexpectedOIDCRedirect": "There was an error during authentication: Unexpected OpenID Redirect.

Please try again later. If the problem persists, please contact support at __support__.

", + "unrecognizedServerResponse": "There was an error during authentication: Unrecognized Server Response.

Please try again later. If the problem persists, please contact support at __support__.

", + "invalidServerResponse": "There was an error during authentication: Invalid Server Response.

Please try again later. If the problem persists, please contact support at __support__.

", + "INTERNAL_SERVER_ERROR": "There was an error during authentication: Internal Server Error.

Please try again later. If the problem persists, please contact support at __support__.

", + "BAD_REQUEST": "There was an error during authentication: Bad Request.

Please try again later. If the problem persists, please contact support at __support__.

", + "INVALID_REQUEST": "There was an error during authentication: Invalid Request.

Please try again later. If the problem persists, please contact support at __support__.

", + "GENERAL_ERROR": "There was an error during authentication: General Error.

Please try again later. If the problem persists, please contact support at __support__.

", + "AUTH_EVENT_NOT_FOUND": "The election in which you are trying to authenticate was not found.

Please review you have the correct link. If the problem persists, please contact support at __support__.

", + "AUTH_EVENT_NOT_STARTED": "The voting period of the election is not open. It might be temporarely paused, stopped or not yet opened.

Please review and try again later. If the problem persists, please contact support at __support__.

", + "CANT_VOTE_MORE_TIMES": "Your authentication was successful, but we have already recorded a vote from you and you can't vote more times.

If you think this is an error, please contact support at __support__.

", + "CANT_AUTHENTICATE_TO_PARENT": "You are trying to authenticate to the wrong election. Please authenticate the parent election.

If you think this is an error, please contact support at __support__.

", + "INVALID_USER_CREDENTIALS": "Invalid User Credentials.There are multiple reasons why this can happen:

Please review your credentials and try again.

If you think this is an error, please contact support at __support__.

" + }, "email-and-password": { "unrecognizedServerResponse": "There was an error during authentication: Unrecognized Server Response.

Please try again later. If the problem persists, please contact support at __support__.

", "invalidServerResponse": "There was an error during authentication: Invalid Server Response.

Please try again later. If the problem persists, please contact support at __support__.

",