From 3528b4eca3cf2519a6af5a43f6b321cbd8eea138 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 18 Apr 2011 10:59:50 -0500 Subject: Moved adder dialog box into entity. The adder dialog box definition has been moved from search facet into entity to make it accessible from other facets. --- install/ui/dialog.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'install/ui/dialog.js') diff --git a/install/ui/dialog.js b/install/ui/dialog.js index cba5b1ab..f60db5ca 100644 --- a/install/ui/dialog.js +++ b/install/ui/dialog.js @@ -276,12 +276,23 @@ IPA.dialog = function(spec) { if (field_spec instanceof Object) { var factory = field_spec.factory || IPA.text_widget; field = factory(field_spec); + + /* This is a bit of a hack, and is here to support ACI + permissions. The target section is a group of several + widgets together. It makes more sense to do them as a + section than as a widget. However, since they can be mixed + into the flow with the other widgets, the section needs to + be defined here with the fields to get the order correct.*/ + if (field.section) { + that.add_section(field); + } else { + that.add_field(field); + } + } else { - var field_name = field_spec; - field = IPA.text_widget({ name: field_name, undo: false }); + field = IPA.text_widget({ name: field_spec, undo: false }); + that.add_field(field); } - - that.add_field(field); } return that; -- cgit