GUACAMOLE-36: Migrate guacLogin and guacNotification to TranslatableMessage.

This commit is contained in:
Michael Jumper committed 2017-01-03 19:42:24 -08:00
1 parent 0671f18d40
commit 986ea4b206
13 files changed
+70 -35

No files matched your search

@@ -36,7 +36,7 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
* An optional instructional message to display within the login
* dialog.
*
* @type String
* @type TranslatableMessage
*/
helpText : '=',
@@ -72,7 +72,7 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
/**
* A description of the error that occurred during login, if any.
*
* @type String
* @type TranslatableMessage
*/
$scope.loginError = null;
@@ -160,11 +160,13 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
// Flag generic error for invalid login
if (error.type === Error.Type.INVALID_CREDENTIALS)
$scope.loginError = 'LOGIN.ERROR_INVALID_LOGIN';
$scope.loginError = {
'key' : 'LOGIN.ERROR_INVALID_LOGIN'
};
// Display error if anything else goes wrong
else
$scope.loginError = error.message;
$scope.loginError = error.translatableMessage;
// Clear all visible password fields
angular.forEach($scope.remainingFields, function clearEnteredValueIfPassword(field) {