summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/src/freeipa/user.js10
-rw-r--r--install/ui/src/freeipa/widget.js6
2 files changed, 14 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
index a920e088a..a9727f57d 100644
--- a/install/ui/src/freeipa/user.js
+++ b/install/ui/src/freeipa/user.js
@@ -447,6 +447,16 @@ return {
name: 'noprivate',
label: '@i18n:objects.user.noprivate',
metadata: '@mc-opt:user_add:noprivate'
+ },
+ {
+ $type: 'entity_select',
+ name: 'gidnumber',
+ editable: true,
+ searchable: true,
+ other_entity: 'group',
+ other_field: 'gidnumber',
+ label_field: 'cn',
+ filter_options: {'posix': true}
}
]
},
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index 41d75fe0c..fc2d6ef0b 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -4299,6 +4299,7 @@ IPA.entity_select_widget = function(spec) {
that.other_entity = IPA.get_entity(spec.other_entity);
that.other_field = spec.other_field;
+ that.label_field = spec.label_field || spec.other_field;
that.options = spec.options || [];
that.filter_options = spec.filter_options || {};
@@ -4339,9 +4340,10 @@ IPA.entity_select_widget = function(spec) {
for (var i=0; i<data.result.count; i++) {
var entry = entries[i];
var values = adapter.load(entry, that.other_field);
- var value = values[0];
+ var label = adapter.load(entry, that.label_field);
+ var option = { label: label[0], value: values[0] };
- options.push(value);
+ options.push(option);
}
that.set_options(options);