summaryrefslogtreecommitdiffstats
path: root/install/ui/add.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2011-08-05 17:12:21 +0200
committerEndi S. Dewata <edewata@redhat.com>2011-08-05 19:14:19 +0000
commit08905eb9a9039b38c032275a87b4f5602e5a63dd (patch)
treea566ca2e61144a2d5d98b751f56c9af125b367e3 /install/ui/add.js
parent966fbd6485f3e2a1bc7fa4c3f96fcb435daa553d (diff)
downloadfreeipa-08905eb9a9039b38c032275a87b4f5602e5a63dd.tar.gz
freeipa-08905eb9a9039b38c032275a87b4f5602e5a63dd.tar.xz
freeipa-08905eb9a9039b38c032275a87b4f5602e5a63dd.zip
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.
Diffstat (limited to 'install/ui/add.js')
-rw-r--r--install/ui/add.js17
1 files changed, 11 insertions, 6 deletions
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() {