From fcba1cb216bf45705dc7dcf5ba686513e2688e0a Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 23 Nov 2011 17:10:07 +0100 Subject: Modifying dns to work with new concept https://fedorahosted.org/freeipa/ticket/2040 --- install/ui/dns.js | 141 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 93 insertions(+), 48 deletions(-) (limited to 'install') diff --git a/install/ui/dns.js b/install/ui/dns.js index af6d5090..49dfe872 100644 --- a/install/ui/dns.js +++ b/install/ui/dns.js @@ -50,7 +50,7 @@ IPA.dns.zone_entity = function(spec) { fields: [ 'idnsname', { - factory: IPA.radio_widget, + type: 'radio', name: 'idnszoneactive', options: [ { value: 'TRUE', label: IPA.get_message('true') }, @@ -66,14 +66,14 @@ IPA.dns.zone_entity = function(spec) { 'idnssoaminimum', 'dnsttl', { - factory: IPA.combobox_widget, + type: 'combobox', name: 'dnsclass', options: [ 'IN', 'CS', 'CH', 'HS' ] }, { - factory: IPA.radio_widget, + type: 'radio', name: 'idnsallowdynupdate', options: [ { value: 'TRUE', label: IPA.get_message('true') }, @@ -81,7 +81,7 @@ IPA.dns.zone_entity = function(spec) { ] }, { - factory: IPA.textarea_widget, + type: 'textarea', name: 'idnsupdatepolicy' } ] @@ -122,10 +122,16 @@ IPA.dns.zone_entity = function(spec) { name: 'name', fields: [ { + type: 'dnszone_name', name: 'idnsname', - required: false + required: false, + radio_name: 'dnszone_name_type' }, - 'name_from_ip' + { + type: 'dnszone_name', + name: 'name_from_ip', + radio_name: 'dnszone_name_type' + } ] }, { @@ -137,12 +143,15 @@ IPA.dns.zone_entity = function(spec) { required: false }, { - factory: IPA.force_dnszone_add_checkbox_widget, + type: 'force_dnszone_add_checkbox', name: 'force', metadata: IPA.get_method_option('dnszone_add', 'force') } ] } + ], + policies: [ + IPA.add_dns_zone_name_policy() ] }); }; @@ -270,7 +279,7 @@ IPA.dnszone_name_section = function(spec) { 'class': 'section-table' }).appendTo(that.container); - var idnsname = that.fields.get_field('idnsname'); + var idnsname = that.widgets.get_widget('idnsname'); var tr = $('').appendTo(table); @@ -282,15 +291,10 @@ IPA.dnszone_name_section = function(spec) { var label = $('