summaryrefslogtreecommitdiffstats
path: root/install/ui/ipa.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-06-05 14:28:44 +0200
committerPetr Vobornik <pvoborni@redhat.com>2012-06-22 10:45:06 +0200
commit6f4121ccbb83493463a1f05d8a24f46042e8bf1d (patch)
tree169b52812f29b56cb9d30a65ac2ec5fd0df4da23 /install/ui/ipa.js
parent0948a9f91b3e423df4d06fd13d23b3ec7ccaa921 (diff)
downloadfreeipa.git-6f4121ccbb83493463a1f05d8a24f46042e8bf1d.tar.gz
freeipa.git-6f4121ccbb83493463a1f05d8a24f46042e8bf1d.tar.xz
freeipa.git-6f4121ccbb83493463a1f05d8a24f46042e8bf1d.zip
Custom Web UI error message for IPA error 911
Error message for IPA error 911 is not very clear for end users. This patch changes the message and adds an advice how to get rid of the error. https://fedorahosted.org/freeipa/ticket/2778
Diffstat (limited to 'install/ui/ipa.js')
-rw-r--r--install/ui/ipa.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js
index 6e862098..7667c766 100644
--- a/install/ui/ipa.js
+++ b/install/ui/ipa.js
@@ -491,6 +491,9 @@ IPA.command = function(spec) {
that.retry = typeof spec.retry == 'undefined' ? true : spec.retry;
that.error_message = spec.error_message || IPA.get_message('dialogs.batch_error_message', 'Some operations failed.');
+ that.error_messages = $.ordered_map({
+ 911: 'Missing HTTP referer. <br/> You have to configure your browser to send HTTP referer header.'
+ });
that.get_command = function() {
return (that.entity ? that.entity+'_' : '') + that.method;
@@ -620,6 +623,13 @@ IPA.command = function(spec) {
};
}
+ // custom messages for set of codes
+ var error_msg = that.error_messages.get(error_thrown.code);
+ if (error_msg) {
+ error_msg = error_msg.replace('${message}', error_thrown.message);
+ error_thrown.message = error_msg;
+ }
+
if (that.retry) {
dialog_open.call(this, xhr, text_status, error_thrown);