Error messages which are associated to error codes should display
their error codes as well, in order to make problems
identification easier.
Use a different error function to display the error code in the
error message.
Signed-off-by: Crístian Viana <vianac(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.login_window.js | 2 +-
ui/js/src/kimchi.report_add_main.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.login_window.js b/ui/js/src/kimchi.login_window.js
index 4933a79..f18981e 100644
--- a/ui/js/src/kimchi.login_window.js
+++ b/ui/js/src/kimchi.login_window.js
@@ -94,7 +94,7 @@ kimchi.login_main = function() {
kimchi.user.showUser(true);
kimchi.window.close();
}, function() {
- kimchi.message.error(i18n['KCHAUTH6001E']);
+ kimchi.message.error.code('KCHAUTH6001E');
$('#btn-login').prop('disabled',
false).text(i18n['KCHAUTH6001M']);
placeCursor('user-id');
});
diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 50807f0..15cc76b 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -9,7 +9,7 @@ kimchi.report_add_main = function() {
var reportName = nameTextbox.val();
var validator = RegExp("^[A-Za-z0-9-]*$");
if (!validator.test(reportName)) {
- kimchi.message.error(i18n['KCHDR6011M']);
+ kimchi.message.error.code('KCHDR6011M');
return false;
}
var formData = addReportForm.serializeObject();
--
1.8.5.3