From 7142cee430a194cca1208ce4ebcd70ee892af1b9 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Tue, 25 Oct 2011 18:41:45 -0500 Subject: Refactored validation code. The validation code in details facet, dialog, and sections have been modified to work more consistently. --- install/ui/add.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'install/ui/add.js') diff --git a/install/ui/add.js b/install/ui/add.js index 65b7711e..621861fd 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -124,25 +124,15 @@ IPA.entity_adder_dialog = function(spec) { command.add_args(that.entity.get_primary_key_prefix()); + if (!that.validate()) return; + var record = {}; that.save(record); - var fields = that.get_fields(); - for (var i=0; i