From 6892d6e594ae5594261d2975bd745549e7684988 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 31 Aug 2011 14:47:03 -0500 Subject: Fixed hard-coded UI message in entity.js. The hard-coded label in IPA.facet has been moved into internal.py to allow translation. Ticket #1701 --- install/ui/entity.js | 14 ++++++-------- install/ui/test/data/ipa_init.json | 1 + 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'install') diff --git a/install/ui/entity.js b/install/ui/entity.js index bba51f79f..8b05d475a 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -117,14 +117,12 @@ IPA.facet = function (spec) { return false; }; - that.get_content = function() { - return $('.content', that.container); - }; - - that.report_error = function(error_thrown){ - var details = $('.details', that.container).empty(); - details.append('

Error: '+error_thrown.name+'

'); - details.append('

'+error_thrown.message+'

'); + that.report_error = function(error_thrown) { + // TODO: The error message should be displayed in the facet footer. + // There should be a standard footer section for all facets. + that.content.empty(); + that.content.append('

'+IPA.get_message('errors.error', 'Error')+': '+error_thrown.name+'

'); + that.content.append('

'+error_thrown.message+'

'); }; that.redirect = function() { diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json index 3de974e43..bd89f5eb7 100644 --- a/install/ui/test/data/ipa_init.json +++ b/install/ui/test/data/ipa_init.json @@ -15994,6 +15994,7 @@ "validation_title": "Validation error" }, "errors": { + "error": "Error", "http_error": "HTTP Error", "internal_error": "Internal Error", "ipa_error": "IPA Error", -- cgit