diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js index 1d740aaa4..b2eeb7896 100644 --- a/install/ui/src/freeipa/dns.js +++ b/install/ui/src/freeipa/dns.js @@ -277,8 +277,8 @@ return { height: 300, sections: [ { - $factory: IPA.dnszone_name_section, name: 'name', + layout: IPA.dnszone_name_section_layout, fields: [ { $type: 'dnszone_name', @@ -401,95 +401,26 @@ IPA.dnszone_details_facet = function(spec, no_init) { return that; }; -IPA.dnszone_name_section = function(spec) { +IPA.dnszone_name_section_layout = function(spec) { - spec = spec || {}; + var that = IPA.fluid_layout(spec); - var that = IPA.details_table_section(spec); + that.radio_names = spec.radio_names || 'idnsname_method'; - that.create = function(container) { - that.container = container; + that.create_label = function(widget) { - that.message_container = $('
', { - style: 'display: none', - 'class': 'dialog-message ui-state-highlight ui-corner-all' - }).appendTo(that.container); + var label_text = widget.label + that.get_measurement_unit_text(widget); - var table = $('', { - 'class': 'section-table' - }).appendTo(that.container); + var label_cont = $('
', { 'class': 'control-label' }); - var idnsname = that.widgets.get_widget('idnsname'); + widget.create_radio(label_cont); - var tr = $('
').appendTo(table); - - var td = $('').appendTo(table); - - td = $('
', { - 'class': 'section-cell-label', - title: idnsname.label - }).appendTo(tr); - - idnsname.create_radio(td); - - var label = $('', { - 'class': 'section-cell-field', - title: idnsname.label - }).appendTo(tr); - - var widget_cont = $('
', { - name: 'idnsname', - 'class': 'field' - }).appendTo(td); - - idnsname.create(widget_cont); - - var idnsname_input = $('input', widget_cont); - - var name_from_ip = that.widgets.get_widget('name_from_ip'); - - tr = $('
', { - 'class': 'section-cell-label', - title: name_from_ip.label - }).appendTo(tr); - - name_from_ip.create_radio(td); - - label = $('', { - 'class': 'section-cell-field', - title: name_from_ip.label - }).appendTo(tr); - - widget_cont = $('
', { - name: 'name_from_ip', - 'class': 'field' - }).appendTo(td); - - name_from_ip.create(widget_cont); - - idnsname.radio.click(); + $('