summaryrefslogtreecommitdiffstats
path: root/install/static/netgroup.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-12-04 00:29:05 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2010-12-06 12:52:47 -0500
commit10f3c0825bfdffa6035e78066001eb3bdc759143 (patch)
treee1a2ddef0846e12275cd661752217e461a204b7c /install/static/netgroup.js
parent37f48c0019c64f20bfc24b021442b643eaf86aab (diff)
downloadfreeipa-10f3c0825bfdffa6035e78066001eb3bdc759143.tar.gz
freeipa-10f3c0825bfdffa6035e78066001eb3bdc759143.tar.xz
freeipa-10f3c0825bfdffa6035e78066001eb3bdc759143.zip
entity i18n
Updated the user,group,host, hostgroup, netgroup, service, and all policy entities to use the newer framework functions, in order to replaced the old array style definitions which did not support i18n. update a few of the newer framerwork functions to get the lables from the meta data. Fixed the unit tests which were expecting a details facet for users, no longer automatically created
Diffstat (limited to 'install/static/netgroup.js')
-rw-r--r--install/static/netgroup.js66
1 files changed, 45 insertions, 21 deletions
diff --git a/install/static/netgroup.js b/install/static/netgroup.js
index 0341ed78a..b0b2ede33 100644
--- a/install/static/netgroup.js
+++ b/install/static/netgroup.js
@@ -20,24 +20,48 @@
/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
-ipa_entity_set_search_definition('netgroup', [
- ['cn', 'Name', null],
- ['description', 'Description', null]
-]);
-
-ipa_entity_set_add_definition('netgroup', [
- 'dialog-add-netgroup', 'Add New Netgroup', [
- ['cn', 'Name', null],
- ['description', 'Description', null]
- ]
-]);
-
-ipa_entity_set_details_definition('netgroup', [
- ipa_stanza({name:'identity', label:'Netgroup Details'}).
- input({name:'cn', label:'Name'}).
- input({name:'description', label:'Description'}).
- input({name:'nisdomainname', label:'NIS Domain'})
-]);
-
-ipa_entity_set_association_definition('netgroup', {
-});
+IPA.add_entity( function() {
+ var that = ipa_entity({
+ 'name': 'netgroup'
+ });
+ that.init = function() {
+ var search_facet = ipa_search_facet({
+ name: 'search',
+ label: 'Search',
+ entity_name: that.name
+ });
+ search_facet.create_column({name:'cn'});
+ search_facet.create_column({name:'description'});
+ that.add_facet(search_facet);
+
+ that.add_facet(function() {
+ var that = ipa_details_facet({name:'details',label:'Details'});
+ that.add_section(
+ ipa_stanza({name:'identity', label:'Netgroup Details'}).
+ input({name:'cn'}).
+ input({name: 'description'}).
+ input({name:'nisdomainname'}));
+ return that;
+ }());
+
+
+ var dialog = ipa_add_dialog({
+ name: 'add',
+ title: 'Add Netgroup',
+ entity_name:'netgroup'
+ });
+
+ that.add_dialog(dialog);
+ dialog.init();
+ dialog.add_field(ipa_text_widget({ name: 'cn',
+ entity_name:'netgroup'}));
+ dialog.add_field(ipa_text_widget({ name: 'description',
+ entity_name:'netgroup' }));
+ that.create_association_facets();
+ that.entity_init();
+ }
+ return that;
+}());
+
+
+