From 6350686710c49b632ea7b1085e4db6755056d263 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 6 Dec 2010 16:30:10 -0600 Subject: Dialog i18n The ipa_add_dialog has been fixed to initialize the fields which will get the labels from metadata. Hard-coded labels have been removed from field declarations. The superior() method has been removed because it doesn't work with multi-level inheritance. Superclass method for now is called using _ (e.g. widget_init). --- install/static/policy.js | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) (limited to 'install/static/policy.js') diff --git a/install/static/policy.js b/install/static/policy.js index 9b62a18f..df397073 100644 --- a/install/static/policy.js +++ b/install/static/policy.js @@ -64,23 +64,18 @@ IPA.add_entity(function (){ var dialog = ipa_add_dialog({ name: 'add', - title: 'Add DNS Zone', - entity_name:'dnszone' + title: 'Add DNS Zone' }); - that.add_dialog(dialog); - dialog.init(); - dialog.add_field(ipa_text_widget({ name: 'idnsname', - entity_name:'dnszone'})); - dialog.add_field(ipa_text_widget({ name: 'idnssoamname', - entity_name:'dnszone'})); - dialog.add_field(ipa_text_widget({ name: 'idnssoarname', - entity_name:'dnszone'})); + dialog.add_field(ipa_text_widget({ name: 'idnsname', undo: false})); + dialog.add_field(ipa_text_widget({ name: 'idnssoamname', undo: false})); + dialog.add_field(ipa_text_widget({ name: 'idnssoarname', undo: false})); + dialog.init(); that.create_association_facets(); that.entity_init(); - } + }; return that; @@ -521,14 +516,13 @@ IPA.add_entity(function (){ var dialog = ipa_add_dialog({ name: 'add', - title: 'Add Automount Location', - entity_name:'automountlocation' + title: 'Add Automount Location' }); - that.add_dialog(dialog); + + dialog.add_field(ipa_text_widget({ name: 'cn', undo: false})); dialog.init(); - dialog.add_field(ipa_text_widget({ name: 'cn', - entity_name:'automountlocation'})); + that.create_association_facets(); that.entity_init(); @@ -574,15 +568,15 @@ IPA.add_entity(function (){ title: 'Add Password Policy', entity_name:'pwpolicy' }); - that.add_dialog(dialog); + + dialog.add_field(ipa_text_widget({ name: 'cn', undo: false})); dialog.init(); - dialog.add_field(ipa_text_widget({ name: 'cn', - entity_name:'pwpolicy'})); + that.create_association_facets(); that.entity_init(); - } + }; return that; }()); -- cgit