summaryrefslogtreecommitdiffstats
path: root/install/ui/dialog.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-04-18 10:59:50 -0500
committerEndi Sukma Dewata <edewata@people01.fedoraproject.org>2011-04-21 19:43:54 +0000
commit3528b4eca3cf2519a6af5a43f6b321cbd8eea138 (patch)
tree8e0ae420440e45429057dd4747a5aaa80eb0d47a /install/ui/dialog.js
parentbc6f9accd9250114b4f0c457fa5badd7f794af8e (diff)
downloadfreeipa-3528b4eca3cf2519a6af5a43f6b321cbd8eea138.tar.gz
freeipa-3528b4eca3cf2519a6af5a43f6b321cbd8eea138.tar.xz
freeipa-3528b4eca3cf2519a6af5a43f6b321cbd8eea138.zip
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.
Diffstat (limited to 'install/ui/dialog.js')
-rw-r--r--install/ui/dialog.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/install/ui/dialog.js b/install/ui/dialog.js
index cba5b1abf..f60db5cab 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;