From ec59e618da26b3514c9e174b7a7e8aa3e0deb462 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Tue, 1 Feb 2011 13:06:58 -0500 Subject: use entity select widget for permissions https://fedorahosted.org/freeipa/ticket/879 --- install/ui/widget.js | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) (limited to 'install/ui/widget.js') diff --git a/install/ui/widget.js b/install/ui/widget.js index 4a77dda83..b5c02ee33 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -1,6 +1,7 @@ /*jsl:import ipa.js */ /* Authors: * Endi Sukma Dewata + * Adam Young * * Copyright (C) 2010 Red Hat * see file 'COPYING' for use and warranty information @@ -1061,3 +1062,93 @@ IPA.table_widget = function (spec) { return that; }; +IPA.entity_select_widget = function(spec){ + + var that = IPA.widget(spec); + var entity = spec.entity || 'group'; + + function populate_select(value){ + function find_success(result){ + $('option', that.entity_select).remove(); + var entities = result.result.result; + for (var i =0; i < result.result.count; i +=1){ + var option = + $('