diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2011-11-03 15:14:15 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-11-04 03:32:20 +0000 |
commit | 6d3924024c48c990afa03e961a2e6b77031990fb (patch) | |
tree | def247797a7969102ce49065379ac51f3e7e2539 /install/ui | |
parent | 32a506cac813d43461f03ecaa0add523e32a3652 (diff) | |
download | freeipa-6d3924024c48c990afa03e961a2e6b77031990fb.tar.gz freeipa-6d3924024c48c990afa03e961a2e6b77031990fb.tar.xz freeipa-6d3924024c48c990afa03e961a2e6b77031990fb.zip |
Field for DNS SOA class changed to combobox with options
https://fedorahosted.org/freeipa/ticket/602
SOA class is an enumerated field. Changing input field to combobox with options allows inserting only valid value.
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/dns.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/install/ui/dns.js b/install/ui/dns.js index 4dbf3e0d2..769eee602 100644 --- a/install/ui/dns.js +++ b/install/ui/dns.js @@ -62,7 +62,13 @@ IPA.entity_factories.dnszone = function() { 'idnssoaexpire', 'idnssoaminimum', 'dnsttl', - 'dnsclass', + { + factory: IPA.combobox_widget, + name: 'dnsclass', + options: [ + 'IN', 'CS', 'CH', 'HS' + ] + }, { factory: IPA.radio_widget, name: 'idnsallowdynupdate', @@ -435,14 +441,14 @@ IPA.entity_factories.dnsrecord = function() { return IPA.entity_builder(). entity('dnsrecord'). containing_entity('dnszone'). - details_facet({ + details_facet({ post_update_hook:function(data){ var result = data.result.result; if (result.idnsname) { this.load(result); } else { this.reset(); - var dialog = IPA.dnsrecord_redirection_dialog(); + var dialog = IPA.dnsrecord_redirection_dialog(); dialog.open(this.container); } }, @@ -603,11 +609,11 @@ IPA.entity_factories.dnsrecord = function() { }; IPA.dnsrecord_redirection_dialog = function(spec) { - spec = spec || {}; - spec.title = spec.title || IPA.messages.dialogs.redirection; - - var that = IPA.dialog(spec); - + spec = spec || {}; + spec.title = spec.title || IPA.messages.dialogs.redirection; + + var that = IPA.dialog(spec); + that.create = function() { $('<p/>', { 'text': IPA.messages.objects.dnsrecord.deleted_no_data @@ -616,7 +622,7 @@ IPA.dnsrecord_redirection_dialog = function(spec) { 'text': IPA.messages.objects.dnsrecord.redirection_dnszone }).appendTo(that.container); }; - + that.create_button({ name: 'ok', label: IPA.messages.buttons.ok, |