diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2011-11-29 14:29:51 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-12-05 16:01:50 +0000 |
commit | 9a09916108539f0d9f70257983666254c0cde67e (patch) | |
tree | 1ccaf3f296ff1c9eaea466cd095a020a4bcd680e | |
parent | ab667912cf19d17e749d13b1d9f428ab6ae55b93 (diff) | |
download | freeipa-9a09916108539f0d9f70257983666254c0cde67e.tar.gz freeipa-9a09916108539f0d9f70257983666254c0cde67e.tar.xz freeipa-9a09916108539f0d9f70257983666254c0cde67e.zip |
Changing definition of basic fields in section from factory to type
https://fedorahosted.org/freeipa/ticket/2040
-rw-r--r-- | install/ui/automount.js | 6 | ||||
-rw-r--r-- | install/ui/dns.js | 192 | ||||
-rw-r--r-- | install/ui/group.js | 9 | ||||
-rw-r--r-- | install/ui/hostgroup.js | 4 | ||||
-rw-r--r-- | install/ui/netgroup.js | 4 | ||||
-rw-r--r-- | install/ui/policy.js | 4 | ||||
-rw-r--r-- | install/ui/serverconfig.js | 8 |
7 files changed, 125 insertions, 102 deletions
diff --git a/install/ui/automount.js b/install/ui/automount.js index 5a92a52ea..8d4f26bbb 100644 --- a/install/ui/automount.js +++ b/install/ui/automount.js @@ -92,7 +92,7 @@ IPA.automount.map_entity = function(spec) { fields: [ 'automountmapname', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' } ] @@ -106,7 +106,7 @@ IPA.automount.map_entity = function(spec) { name: 'general', fields: [ { - factory: IPA.radio_widget, + type: 'radio', name: 'method', label: IPA.messages.objects.automountmap.map_type, options: [ @@ -122,7 +122,7 @@ IPA.automount.map_entity = function(spec) { }, 'automountmapname', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' } ] diff --git a/install/ui/dns.js b/install/ui/dns.js index 49dfe8727..39630472b 100644 --- a/install/ui/dns.js +++ b/install/ui/dns.js @@ -511,10 +511,10 @@ IPA.dns.record_entity = function(spec) { label: IPA.messages.details.identity, fields:[ { - type: 'dnsrecord_host_link', - name: 'idnsname', - other_entity:'host', - label:IPA.get_entity_param( + type: 'dnsrecord_host_link', + name: 'idnsname', + other_entity:'host', + label:IPA.get_entity_param( 'dnsrecord', 'idnsname').label } ] @@ -523,45 +523,53 @@ IPA.dns.record_entity = function(spec) { name:'standard', label:IPA.messages.objects.dnsrecord.standard, fields:[ - { factory: IPA.multivalued_text_widget, - name: 'arecord', - metadata: {primary_key: false}, - label:'A' + { + type: 'multivalued', + name: 'arecord', + metadata: {primary_key: false}, + label:'A' }, - { factory: IPA.multivalued_text_widget, - name: 'aaaarecord', - metadata: {primary_key: false}, - label:'AAAA' + { + type: 'multivalued', + name: 'aaaarecord', + metadata: {primary_key: false}, + label:'AAAA' }, - { factory: IPA.multivalued_text_widget, - name: 'ptrrecord', - metadata: {primary_key: false}, - label:'PTR' + { + type: 'multivalued', + name: 'ptrrecord', + metadata: {primary_key: false}, + label:'PTR' }, - { factory: IPA.multivalued_text_widget, - name: 'srvrecord', - metadata: {primary_key: false}, - label:'SRV' + { + type: 'multivalued', + name: 'srvrecord', + metadata: {primary_key: false}, + label:'SRV' }, - { factory: IPA.multivalued_text_widget, - name: 'txtrecord', - metadata: {primary_key: false}, - label:'TXT' + { + type: 'multivalued', + name: 'txtrecord', + metadata: {primary_key: false}, + label:'TXT' }, - { factory: IPA.multivalued_text_widget, - name: 'cnamerecord', - metadata: {primary_key: false}, - label:'CNAME' + { + type: 'multivalued', + name: 'cnamerecord', + metadata: {primary_key: false}, + label:'CNAME' }, - { factory: IPA.multivalued_text_widget, - label:'MX', - metadata: {primary_key: false}, - name:"mxrecord" + { + type: 'multivalued', + label:'MX', + metadata: {primary_key: false}, + name:"mxrecord" }, - { factory: IPA.multivalued_text_widget, - label:'NS', - metadata: {primary_key: false}, - name:"nsrecord" + { + type: 'multivalued', + label:'NS', + metadata: {primary_key: false}, + name:"nsrecord" } ] @@ -570,64 +578,76 @@ IPA.dns.record_entity = function(spec) { name:'unusual', label:IPA.messages.objects.dnsrecord.other, fields:[ - { factory: IPA.multivalued_text_widget, - label:'AFSDB', - metadata: {primary_key: false}, - name: "afsdbrecord" + { + type: 'multivalued', + label:'AFSDB', + metadata: {primary_key: false}, + name: "afsdbrecord" }, - { factory: IPA.multivalued_text_widget, - label:'CERT', - metadata: {primary_key: false}, - name:"certrecord" + { + type: 'multivalued', + label:'CERT', + metadata: {primary_key: false}, + name:"certrecord" }, - { factory: IPA.multivalued_text_widget, - label:'DNAME', - metadata: {primary_key: false}, - name:"dnamerecord" + { + type: 'multivalued', + label:'DNAME', + metadata: {primary_key: false}, + name:"dnamerecord" }, - { factory: IPA.multivalued_text_widget, - label:'DSRECORD', - metadata: {primary_key: false}, - name:"dsrecord" + { + type: 'multivalued', + label:'DSRECORD', + metadata: {primary_key: false}, + name:"dsrecord" }, - { factory: IPA.multivalued_text_widget, - label:'KEY', - metadata: {primary_key: false}, - name:"keyrecord" + { + type: 'multivalued', + label:'KEY', + metadata: {primary_key: false}, + name:"keyrecord" }, - { factory: IPA.multivalued_text_widget, - label:'KX', - metadata: {primary_key: false}, - name:"kxrecord" + { + type: 'multivalued', + label:'KX', + metadata: {primary_key: false}, + name:"kxrecord" }, - { factory: IPA.multivalued_text_widget, - label:'LOC', - metadata: {primary_key: false}, - name:"locrecord" + { + type: 'multivalued', + label:'LOC', + metadata: {primary_key: false}, + name:"locrecord" }, - { factory: IPA.multivalued_text_widget, - label:'NAPTR', - name:"naptrrecord" + { + type: 'multivalued', + label:'NAPTR', + name:"naptrrecord" }, - { factory: IPA.multivalued_text_widget, - label:'NSEC', - metadata: {primary_key: false}, - name:"nsecrecord" + { + type: 'multivalued', + label:'NSEC', + metadata: {primary_key: false}, + name:"nsecrecord" }, - { factory: IPA.multivalued_text_widget, - label:'RRSIG', - metadata: {primary_key: false}, - name:"rrsigrecord" + { + type: 'multivalued', + label:'RRSIG', + metadata: {primary_key: false}, + name:"rrsigrecord" }, - { factory: IPA.multivalued_text_widget, - label:'SIG', - metadata: {primary_key: false}, - name:"sigrecord" + { + type: 'multivalued', + label:'SIG', + metadata: {primary_key: false}, + name:"sigrecord" }, - { factory: IPA.multivalued_text_widget, - label:'SSHFP', - metadata: {primary_key: false}, - name:"sshfprecord" + { + type: 'multivalued', + label:'SSHFP', + metadata: {primary_key: false}, + name:"sshfprecord" } ] } @@ -645,14 +665,14 @@ IPA.dns.record_entity = function(spec) { fields: [ 'idnsname', { + factory: IPA.dnsrecord_type_widget, name: 'record_type', - label: IPA.messages.objects.dnsrecord.type, - factory: IPA.dnsrecord_type_widget + label: IPA.messages.objects.dnsrecord.type }, { + type: 'text', name: 'record_data', label: IPA.messages.objects.dnsrecord.data, - factory: IPA.text_widget, required: true } ] diff --git a/install/ui/group.js b/install/ui/group.js index 91e1af7f6..959a96c40 100644 --- a/install/ui/group.js +++ b/install/ui/group.js @@ -46,7 +46,7 @@ IPA.group.entity = function(spec) { fields: [ 'cn', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' }, 'gidnumber' @@ -110,11 +110,11 @@ IPA.group.entity = function(spec) { fields: [ 'cn', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' }, { - factory: IPA.group_nonposix_checkbox_widget, + type: 'nonposix_checkbox', name: 'nonposix', label: IPA.messages.objects.group.posix, checked: true @@ -142,6 +142,9 @@ IPA.group_nonposix_checkbox_widget = function (spec) { return that; }; +IPA.widget_factories['nonposix_checkbox'] = IPA.group_nonposix_checkbox_widget; +IPA.field_factories['nonposix_checkbox'] = IPA.checkbox_fields; + IPA.group_adder_dialog = function(spec) { spec = spec || {}; diff --git a/install/ui/hostgroup.js b/install/ui/hostgroup.js index 58e25e3f1..00f76f2c6 100644 --- a/install/ui/hostgroup.js +++ b/install/ui/hostgroup.js @@ -44,7 +44,7 @@ IPA.hostgroup.entity = function(spec) { fields: [ 'cn', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' } ] @@ -76,7 +76,7 @@ IPA.hostgroup.entity = function(spec) { fields: [ 'cn', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' } ] diff --git a/install/ui/netgroup.js b/install/ui/netgroup.js index dcec180fe..6546c53d5 100644 --- a/install/ui/netgroup.js +++ b/install/ui/netgroup.js @@ -43,7 +43,7 @@ IPA.netgroup.entity = function(spec) { fields: [ 'cn', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' }, 'nisdomainname' @@ -76,7 +76,7 @@ IPA.netgroup.entity = function(spec) { fields: [ 'cn', { - factory: IPA.textarea_widget, + type: 'textarea', name: 'description' } ] diff --git a/install/ui/policy.js b/install/ui/policy.js index 4726608c2..fbabd0830 100644 --- a/install/ui/policy.js +++ b/install/ui/policy.js @@ -39,7 +39,7 @@ IPA.pwpolicy.entity = function(spec) { name : 'identity', fields:[ { - factory: IPA.entity_link_widget, + type: 'link', name: 'cn', other_entity: 'group' }, @@ -58,7 +58,7 @@ IPA.pwpolicy.entity = function(spec) { adder_dialog({ fields: [ { - factory: IPA.entity_select_widget, + type: 'entity_select', name: 'cn', other_entity: 'group', other_field: 'cn', diff --git a/install/ui/serverconfig.js b/install/ui/serverconfig.js index 9ecf190c4..b120c4242 100644 --- a/install/ui/serverconfig.js +++ b/install/ui/serverconfig.js @@ -49,7 +49,7 @@ IPA.config.entity = function(spec) { 'ipausersearchfields', 'ipadefaultemaildomain', { - factory: IPA.entity_select_widget, + type: 'entity_select', name: 'ipadefaultprimarygroup', other_entity: 'group', other_field: 'cn' @@ -59,11 +59,11 @@ IPA.config.entity = function(spec) { 'ipamaxusernamelength', 'ipapwdexpadvnotify', { - factory: IPA.checkbox_widget, + type: 'checkbox', name: 'ipamigrationenabled' }, { - factory: IPA.multivalued_text_widget, + type: 'multivalued', name: 'ipauserobjectclasses' } ] @@ -74,7 +74,7 @@ IPA.config.entity = function(spec) { fields: [ 'ipagroupsearchfields', { - factory: IPA.multivalued_text_widget, + type: 'multivalued', name: 'ipagroupobjectclasses' } ] |