From caa9d52666e5beb7321dc6c80820eeacca356077 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Fri, 18 Nov 2011 19:47:39 -0600 Subject: Refactored facet.load(). The load() in IPA.facet has been modified to accept the complete data returned by the server instead of just the result. This is needed by HBAC Test to access other attributes returned in the test result. Ticket #388 --- install/ui/add.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'install/ui/add.js') diff --git a/install/ui/add.js b/install/ui/add.js index 032302e3..c1031f8b 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -30,7 +30,6 @@ IPA.entity_adder_dialog = function(spec) { var that = IPA.dialog(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; @@ -107,26 +106,18 @@ IPA.entity_adder_dialog = function(spec) { IPA.nav.show_entity_page(that.entity, 'default', pkey); } - that.add = function(on_success, on_error) { + that.create_add_command = function(record) { var pkey_name = that.entity.metadata.primary_key; var command = IPA.command({ entity: that.entity.name, method: that.method, - retry: that.retry, - on_success: on_success, - on_error: on_error + retry: that.retry }); - that.command = command; command.add_args(that.entity.get_primary_key_prefix()); - if (!that.validate()) return; - - var record = {}; - that.save(record); - var fields = that.fields.get_fields(); for (var j=0; j