From f7429a2dec96eec302629b0b792e785ba832d5ef Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Tue, 1 Mar 2016 12:17:04 +0100 Subject: [PATCH] Add field for group id in user add dialog Add new field in user add dialog. This combo box lists all posix groups so user can choose one. It is also possible to fill a GID number which is not in the list. https://fedorahosted.org/freeipa/ticket/5505 Reviewed-By: Petr Vobornik --- install/ui/src/freeipa/user.js | 10 ++++++++++ install/ui/src/freeipa/widget.js | 6 ++++-- 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