diff options
author | Martin Basti <mbasti@redhat.com> | 2014-09-16 16:14:07 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-09-25 16:38:02 +0200 |
commit | 23620a40255c8f3963ce8ca012c34f340b2f780b (patch) | |
tree | 28d2bda5a909b94199fd4fa027a89140c9d9d806 /install/ui | |
parent | 239adf9de40748caa9e1522c9cd04aedd5516c75 (diff) | |
download | freeipa-23620a40255c8f3963ce8ca012c34f340b2f780b.tar.gz freeipa-23620a40255c8f3963ce8ca012c34f340b2f780b.tar.xz freeipa-23620a40255c8f3963ce8ca012c34f340b2f780b.zip |
WebUI: DNS: Remove ip-address, admin-email options
Part of ticket: https://fedorahosted.org/freeipa/ticket/4149
Reviewed-By: Petr Spacek <pspacek@redhat.com>
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/src/freeipa/dns.js | 93 |
1 files changed, 4 insertions, 89 deletions
diff --git a/install/ui/src/freeipa/dns.js b/install/ui/src/freeipa/dns.js index 7079b7e4e..675a2d7e8 100644 --- a/install/ui/src/freeipa/dns.js +++ b/install/ui/src/freeipa/dns.js @@ -142,7 +142,10 @@ return { name: 'identity', fields: [ 'idnsname', - 'idnssoamname', + { + name: 'idnssoamname', + required: true + }, 'idnssoarname', 'idnssoaserial', 'idnssoarefresh', @@ -276,7 +279,6 @@ return { ], standard_association_facets: true, adder_dialog: { - $factory: IPA.dnszone_adder_dialog, height: 300, sections: [ { @@ -296,26 +298,6 @@ return { validators: ['network'] } ] - }, - { - name: 'other', - fields: [ - 'idnssoamname', - { - name: 'ip_address', - validators: [ 'ip_address' ], - metadata: '@mc-opt:dnszone_add:ip_address' - }, - { - name: 'idnssoarname', - required: false - }, - { - $type: 'force_dnszone_add_checkbox', - name: 'force', - metadata: '@mc-opt:dnszone_add:force' - } - ] } ], policies: [ @@ -663,73 +645,6 @@ IPA.force_dnszone_add_checkbox_widget = function(spec) { return IPA.checkbox_widget(spec); }; -IPA.dnszone_adder_dialog = function(spec) { - - spec = spec || {}; - - var that = IPA.entity_adder_dialog(spec); - - function ends_with(str, suffix) { - return str.indexOf(suffix, str.length - suffix.length) !== -1; - } - - var init = function() { - var zone_w = that.fields.get_field('idnsname').widget; - var reverse_zone_w = that.fields.get_field('name_from_ip').widget; - var ns_w = that.fields.get_field('idnssoamname').widget; - - zone_w.value_changed.attach(that.check_ns_ip); - reverse_zone_w.value_changed.attach(that.check_ns_ip); - ns_w.value_changed.attach(that.check_ns_ip); - }; - - that.check_ns_ip = function() { - var ip_address_f = that.fields.get_field('ip_address'); - var zone_w = that.fields.get_field('idnsname').widget; - var ns_w = that.fields.get_field('idnssoamname').widget; - - var zone = zone_w.save()[0] || ''; - var ns = ns_w.save()[0] || ''; - - var zone_is_reverse = !zone_w.enabled || - ends_with(zone, '.in-addr.arpa.') || - ends_with(zone, '.ip6.arpa.'); - var relative_ns = true; - var ns_in_zone = false; - - if (ns && ns[ns.length-1] === '.') { - relative_ns = false; - ns = ns.slice(0, -1); - } - - if (zone && zone[zone.length-1] === '.') { - zone = zone.slice(0, -1); - } - - if (ns && zone && ends_with(ns, '.' + zone)) { - ns_in_zone = true; - } - - if (!zone_is_reverse && (relative_ns || ns_in_zone)) { - ip_address_f.set_enabled(true); - ip_address_f.set_required(true); - } else { - ip_address_f.reset(); - ip_address_f.set_required(false); - ip_address_f.set_enabled(false); - } - }; - - that.create_content = function() { - that.entity_adder_dialog_create_content(); - that.container.addClass('dnszone-adder-dialog'); - }; - - init(); - - return that; -}; - IPA.dns.add_permission_action = function(spec) { spec = spec || {}; |