From ebd0bdd92e516dd04140a456fe5b3284a1e5c0f9 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Thu, 14 Jun 2012 21:42:49 +0200 Subject: [PATCH 1/3] fix ugly login error message --- .../webapp/resources/js/login/sonia.login.form.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scm-webapp/src/main/webapp/resources/js/login/sonia.login.form.js b/scm-webapp/src/main/webapp/resources/js/login/sonia.login.form.js index cb8f7e5240..c4ed773987 100644 --- a/scm-webapp/src/main/webapp/resources/js/login/sonia.login.form.js +++ b/scm-webapp/src/main/webapp/resources/js/login/sonia.login.form.js @@ -38,6 +38,7 @@ Sonia.login.Form = Ext.extend(Ext.FormPanel,{ waitTitleText: 'Connecting', WaitMsgText: 'Sending data...', failedMsgText: 'Login failed!', + failedDescriptionText: 'Incorrect username, password or not enough permission. Please Try again.', initComponent: function(){ @@ -88,7 +89,7 @@ Sonia.login.Form = Ext.extend(Ext.FormPanel,{ }] }; - this.addEvents('cancel'); + this.addEvents('cancel', 'failure'); Ext.apply(this, Ext.apply(this.initialConfig, config)); Sonia.login.Form.superclass.initComponent.apply(this, arguments); @@ -118,7 +119,13 @@ Sonia.login.Form = Ext.extend(Ext.FormPanel,{ if ( debug ){ console.debug( 'login failed' ); } - Ext.Msg.alert(this.failedMsgText); + this.fireEvent('failure'); + Ext.Msg.show({ + title: this.failedMsgText, + msg: this.failedDescriptionText, + buttons: Ext.Msg.OK, + icon: Ext.MessageBox.WARNING + }); form.reset(); } }); From bc99edb176f8223ce32883aeddc0e3b39c958a1f Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Thu, 14 Jun 2012 21:46:12 +0200 Subject: [PATCH 2/3] german localization for failedDescriptionText --- scm-webapp/src/main/webapp/resources/js/i18n/de.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scm-webapp/src/main/webapp/resources/js/i18n/de.js b/scm-webapp/src/main/webapp/resources/js/i18n/de.js index e93addef4e..a98f58afad 100644 --- a/scm-webapp/src/main/webapp/resources/js/i18n/de.js +++ b/scm-webapp/src/main/webapp/resources/js/i18n/de.js @@ -86,7 +86,9 @@ if (Sonia.login.Form){ cancelText: 'Abbrechen', waitTitleText: 'Verbinden', WaitMsgText: 'Übertrage Daten...', - failedMsgText: 'Anmeldung fehlgeschlagen!' + failedMsgText: 'Anmeldung fehlgeschlagen!', + failedDescriptionText: 'Falscher Benutzername, Passwort oder sie haben nicht\n\ + genug Berechtigungen. Bitte versuchen sie es erneut.' }); } From 394a01c4edb70f413e38484103ca532d4c0cf00c Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Fri, 15 Jun 2012 16:03:37 +0200 Subject: [PATCH 3/3] close branch issue-183