summaryrefslogtreecommitdiffstats
path: root/install/ui/add.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/add.js')
-rw-r--r--install/ui/add.js18
1 files changed, 3 insertions, 15 deletions
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<fields.length; i++) {
- fields[i].validate();
- }
-
- var valid = true;
-
var sections = that.sections.values;
- for (i=0; i<sections.length; i++) {
+ for (var i=0; i<sections.length; i++) {
var section = sections[i];
- if (!section.is_valid() || !valid) {
- valid = false;
- continue;
- }
-
var section_fields = section.fields.values;
for (var j=0; j<section_fields.length; j++) {
var field = section_fields[j];
@@ -162,8 +152,6 @@ IPA.entity_adder_dialog = function(spec) {
}
}
- if (!valid) return;
-
//alert(JSON.stringify(command.to_json()));
if (that.pre_execute_hook) {