From 08905eb9a9039b38c032275a87b4f5602e5a63dd Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Fri, 5 Aug 2011 17:12:21 +0200 Subject: Fixed adding host without DNS reverse zone https://fedorahosted.org/freeipa/ticket/1481 Shows status dialog instead of error dialog (error 4304 is treated like success). Refactored error dialog. Added generic message dialog (IPA.message_dialog) Modified core tests to work with dialog. --- install/ui/add.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'install/ui/add.js') diff --git a/install/ui/add.js b/install/ui/add.js index 988ea8ff1..b4f1228f0 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -31,6 +31,9 @@ IPA.add_dialog = function (spec) { that.method = spec.method || 'add'; that.pre_execute_hook = spec.pre_execute_hook; + that.on_error = spec.on_error ; + that.retry = typeof spec.retry !== 'undefined' ? spec.retry : true; + that.command = null; function show_edit_page(entity,result){ var pkey_name = entity.metadata.primary_key; @@ -51,9 +54,11 @@ IPA.add_dialog = function (spec) { var command = IPA.command({ entity: that.entity.name, method: that.method, + retry: that.retry, on_success: on_success, on_error: on_error }); + that.command = command; pkey_prefix = that.entity.get_primary_key_prefix(); @@ -127,8 +132,8 @@ IPA.add_dialog = function (spec) { var table = facet.table; table.refresh(); that.close(); - } - ); + }, + that.on_error); }); that.add_button(IPA.messages.buttons.add_and_add_another, function() { @@ -141,8 +146,8 @@ IPA.add_dialog = function (spec) { var table = facet.table; table.refresh(); that.reset(); - } - ); + }, + that.on_error); }); that.add_button(IPA.messages.buttons.add_and_edit, function() { @@ -154,8 +159,8 @@ IPA.add_dialog = function (spec) { that.close(); var result = data.result.result; that.show_edit_page(that.entity,result); - } - ); + }, + that.on_error); }); that.add_button(IPA.messages.buttons.cancel, function() { -- cgit