summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-09-22 11:44:41 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-09-23 13:13:16 +0000
commit8e95d1eb4e916c5fb218d161f568afaac0a06f0f (patch)
treea7e3d8fffdb7399c6886db75133d868865afa045
parent390d017e321fd5ed56af094cf1f1c74f64e95735 (diff)
downloadfreeipa-8e95d1eb4e916c5fb218d161f568afaac0a06f0f.tar.gz
freeipa-8e95d1eb4e916c5fb218d161f568afaac0a06f0f.tar.xz
freeipa-8e95d1eb4e916c5fb218d161f568afaac0a06f0f.zip
Removed undo flags from dialog field specs.
Since the undo flag is now automatically set to false in dialogs, it's no longer necessary to specify it in the field specs. Ticket #1394
-rw-r--r--install/ui/aci.js40
-rw-r--r--install/ui/automount.js19
-rw-r--r--install/ui/dns.js29
-rw-r--r--install/ui/entitle.js16
-rw-r--r--install/ui/group.js1
-rw-r--r--install/ui/host.js16
-rw-r--r--install/ui/policy.js3
-rw-r--r--install/ui/service.js9
-rw-r--r--install/ui/sudo.js3
-rw-r--r--install/ui/user.js11
10 files changed, 51 insertions, 96 deletions
diff --git a/install/ui/aci.js b/install/ui/aci.js
index 13fbc7d1..929e13d4 100644
--- a/install/ui/aci.js
+++ b/install/ui/aci.js
@@ -69,22 +69,18 @@ IPA.entity_factories.permission = function() {
{
name: 'general',
fields: [
- {
- name: 'cn',
- undo: false
- },
+ 'cn',
{
factory: IPA.rights_widget,
name: 'permissions',
- join: true, undo: false
+ join: true
}
]
},
{
factory: IPA.target_section,
name: 'target',
- label: IPA.messages.objects.permission.target,
- undo: false
+ label: IPA.messages.objects.permission.target
}
]
}).
@@ -173,8 +169,7 @@ IPA.entity_factories.selfservice = function() {
'aciname',
{factory:IPA.attributes_widget,
object_type:'user',
- name:'attrs',
- undo: false
+ name:'attrs'
}]
}).
build();
@@ -218,21 +213,20 @@ IPA.entity_factories.delegation = function() {
factory: IPA.entity_select_widget,
name: 'group',
other_entity: 'group',
- other_field: 'cn',
- undo: false
+ other_field: 'cn'
},
{
factory: IPA.entity_select_widget,
name: 'memberof',
other_entity: 'group',
other_field: 'cn',
- join: true,
- undo: false
+ join: true
},
{
- factory:IPA.attributes_widget,
- name: 'attrs', object_type: 'user',
- join: true, undo: false
+ factory: IPA.attributes_widget,
+ name: 'attrs',
+ object_type: 'user',
+ join: true
}]
}).
build();
@@ -400,7 +394,6 @@ IPA.target_section = function(spec) {
spec = spec || {};
var that = IPA.details_section(spec);
- that.undo = typeof spec.undo == 'undefined' ? true : spec.undo;
var target_types = [
{
@@ -504,31 +497,26 @@ IPA.target_section = function(spec) {
var init = function() {
that.filter_text = IPA.text_widget({
name: 'filter',
- undo: that.undo,
entity: spec.entity
});
that.subtree_textarea = IPA.textarea_widget({
entity: spec.entity,
name: 'subtree',
- cols: 30, rows: 1,
- undo: that.undo
+ cols: 30, rows: 1
});
that.group_select = IPA.entity_select_widget({
entity: spec.entity,
name: 'targetgroup',
other_entity: 'group',
- other_field: 'cn',
- undo: that.undo
+ other_field: 'cn'
});
that.type_select = IPA.select_widget({
entity: spec.entity,
- name: 'type',
- undo: that.undo
+ name: 'type'
});
that.attribute_table = IPA.attributes_widget({
entity: spec.entity,
- name: 'attrs',
- undo: that.undo
+ name: 'attrs'
});
that.add_field(that.filter_text);
diff --git a/install/ui/automount.js b/install/ui/automount.js
index 8be2b657..72ced632 100644
--- a/install/ui/automount.js
+++ b/install/ui/automount.js
@@ -104,17 +104,10 @@ IPA.entity_factories.automountmap = function() {
value: 'add_indirect',
label: IPA.messages.objects.automountmap.indirect
}
- ],
- undo: false
+ ]
},
- {
- name: 'automountmapname',
- undo: false
- },
- {
- name: 'description',
- undo: false
- }
+ 'automountmapname',
+ 'description'
]
},
{
@@ -123,14 +116,12 @@ IPA.entity_factories.automountmap = function() {
{
name: 'key',
label: IPA.get_method_option(
- 'automountmap_add_indirect', 'key').label,
- undo: false
+ 'automountmap_add_indirect', 'key').label
},
{
name: 'parentmap',
label: IPA.get_method_option(
- 'automountmap_add_indirect', 'parentmap').label,
- undo: false
+ 'automountmap_add_indirect', 'parentmap').label
}
]
}
diff --git a/install/ui/dns.js b/install/ui/dns.js
index da00a049..cf8f6861 100644
--- a/install/ui/dns.js
+++ b/install/ui/dns.js
@@ -93,15 +93,13 @@ IPA.entity_factories.dnszone = function() {
fields: [
{
name: 'idnsname',
- optional: true,
- undo: false
+ optional: true
},
'name_from_ip',
'idnssoamname',
{
name: 'idnssoarname',
- optional: true,
- undo: false
+ optional: true
},
{
factory: IPA.force_dnszone_add_checkbox_widget,
@@ -583,28 +581,26 @@ IPA.entity_factories.dnsrecord = function() {
]
}).
adder_dialog({
- pre_execute_hook:function(command){
+ pre_execute_hook: function(command) {
var record_type = command.options.record_type;
var record_data = command.options.record_data;
- delete command.options.record_type;
- delete command.options.record_data;
+ delete command.options.record_type;
+ delete command.options.record_data;
command.options[record_type] = record_data;
},
fields: [
'idnsname',
{
- name:'record_type',
- label:IPA.messages.objects.dnsrecord.type,
- factory:IPA.dnsrecord_type_widget,
- undo: false
+ name: 'record_type',
+ label: IPA.messages.objects.dnsrecord.type,
+ factory: IPA.dnsrecord_type_widget
},
{
- name:'record_data',
- label:IPA.messages.objects.dnsrecord.data,
- factory:IPA.text_widget,
- param_info:{required:true},
- undo: false
+ name: 'record_data',
+ label: IPA.messages.objects.dnsrecord.data,
+ factory: IPA.text_widget,
+ param_info: {required:true}
}
]
}).
@@ -670,7 +666,6 @@ IPA.force_dnszone_add_checkbox_widget = function(spec) {
var param_info = IPA.get_method_option('dnszone_add', spec.name);
spec.label = param_info.label;
spec.tooltip = param_info.doc;
- spec.undo = false;
return IPA.checkbox_widget(spec);
};
diff --git a/install/ui/entitle.js b/install/ui/entitle.js
index 693206cb..844c7ad4 100644
--- a/install/ui/entitle.js
+++ b/install/ui/entitle.js
@@ -120,20 +120,17 @@ IPA.entity_factories.entitle = function() {
fields: [
{
name: 'username',
- label: IPA.get_method_arg('entitle_register', 'username').label,
- undo: false
+ label: IPA.get_method_arg('entitle_register', 'username').label
},
{
name: 'password',
label: IPA.get_method_option('entitle_register', 'password').label,
- type: 'password',
- undo: false
+ type: 'password'
}
/* currently not supported
, {
name: 'ipaentitlementid',
- label: IPA.get_method_option('entitle_register', 'ipaentitlementid').label,
- undo: false
+ label: IPA.get_method_option('entitle_register', 'ipaentitlementid').label
}
*/
]
@@ -146,8 +143,7 @@ IPA.entity_factories.entitle = function() {
fields: [
{
name: 'certificate',
- label: IPA.messages.objects.entitle.certificate,
- undo: false
+ label: IPA.messages.objects.entitle.certificate
}
]
}).
@@ -159,7 +155,6 @@ IPA.entity_factories.entitle = function() {
{
name: 'quantity',
label: IPA.get_method_arg('entitle_consume', 'quantity').label,
- undo: false,
metadata: IPA.get_method_arg('entitle_consume', 'quantity')
}
]
@@ -172,8 +167,7 @@ IPA.entity_factories.entitle = function() {
fields: [
{
name: 'certificate',
- label: IPA.messages.objects.entitle.certificate,
- undo: false
+ label: IPA.messages.objects.entitle.certificate
}
]
});
diff --git a/install/ui/group.js b/install/ui/group.js
index f49c00f0..ad705eb2 100644
--- a/install/ui/group.js
+++ b/install/ui/group.js
@@ -95,7 +95,6 @@ IPA.entity_factories.group = function () {
factory: IPA.group_nonposix_checkbox_widget,
name: 'nonposix',
label: IPA.messages.objects.group.posix,
- undo: false,
checked: true
},
'gidnumber']
diff --git a/install/ui/host.js b/install/ui/host.js
index 1a3ccadc..6720b4fc 100644
--- a/install/ui/host.js
+++ b/install/ui/host.js
@@ -134,8 +134,7 @@ IPA.entity_factories.host = function () {
factory: IPA.text_widget,
name: 'hostname',
label: IPA.messages.objects.service.host,
- param_info: { required: true },
- undo: false
+ param_info: { required: true }
},
{
factory: IPA.dnszone_select_widget,
@@ -143,8 +142,7 @@ IPA.entity_factories.host = function () {
label: IPA.metadata.objects.dnszone.label_singular,
editable: true,
empty_option: false,
- param_info: { required: true },
- undo: false
+ param_info: { required: true }
}
]
},
@@ -154,8 +152,7 @@ IPA.entity_factories.host = function () {
{
factory: IPA.text_widget,
name: 'ip_address',
- param_info: IPA.get_method_option('host_add', 'ip_address'),
- undo: false
+ param_info: IPA.get_method_option('host_add', 'ip_address')
},
{
factory: IPA.force_host_add_checkbox_widget,
@@ -406,7 +403,6 @@ IPA.force_host_add_checkbox_widget = function(spec) {
var param_info = IPA.get_method_option('host_add', spec.name);
spec.label = param_info.label;
spec.tooltip = param_info.doc;
- spec.undo = false;
return IPA.checkbox_widget(spec);
};
@@ -630,15 +626,13 @@ IPA.host_password_widget = function(spec) {
var password1 = dialog.add_field(IPA.text_widget({
name: 'password1',
label: IPA.messages.password.new_password,
- type: 'password',
- undo: false
+ type: 'password'
}));
var password2 = dialog.add_field(IPA.text_widget({
name: 'password2',
label: IPA.messages.password.verify_password,
- type: 'password',
- undo: false
+ type: 'password'
}));
dialog.add_button(label, function() {
diff --git a/install/ui/policy.js b/install/ui/policy.js
index dd4efa02..4c4733dc 100644
--- a/install/ui/policy.js
+++ b/install/ui/policy.js
@@ -49,8 +49,7 @@ IPA.entity_factories.pwpolicy = function() {
factory: IPA.entity_select_widget,
name: 'cn',
other_entity: 'group',
- other_field: 'cn',
- undo: false
+ other_field: 'cn'
},
'cospriority'],
width: 400,
diff --git a/install/ui/service.js b/install/ui/service.js
index 7ff1ba71..87b0bbf2 100644
--- a/install/ui/service.js
+++ b/install/ui/service.js
@@ -119,8 +119,7 @@ IPA.service_add_dialog = function(spec) {
label: IPA.messages.objects.service.service,
size: 20,
entity: spec.entity,
- param_info: { required: true },
- undo: false
+ param_info: { required: true }
})).
field(IPA.entity_select_widget({
name: 'host',
@@ -128,14 +127,12 @@ IPA.service_add_dialog = function(spec) {
other_field: 'fqdn',
entity: spec.entity,
label: IPA.messages.objects.service.host,
- param_info: { required: true },
- undo: false
+ param_info: { required: true }
})).
field(IPA.checkbox_widget({
name: 'force',
entity: spec.entity,
- param_info: IPA.get_method_option('service_add', 'force'),
- undo: false
+ param_info: IPA.get_method_option('service_add', 'force')
}));
diff --git a/install/ui/sudo.js b/install/ui/sudo.js
index 23e5f7a2..a9773124 100644
--- a/install/ui/sudo.js
+++ b/install/ui/sudo.js
@@ -570,8 +570,7 @@ IPA.sudo.options_section = function(spec) {
var ipasudoopt = dialog.add_field(IPA.text_widget({
name: 'ipasudoopt',
- label: label,
- undo: false
+ label: label
}));
dialog.add_button(IPA.messages.buttons.add, function() {
diff --git a/install/ui/user.js b/install/ui/user.js
index 6243cd2d..62794ad7 100644
--- a/install/ui/user.js
+++ b/install/ui/user.js
@@ -142,11 +142,12 @@ IPA.entity_factories.user = function() {
fields: [
{
factory : IPA.text_widget,
- undo: false,
optional: true,
name:'uid'
},
- 'givenname', 'sn']
+ 'givenname',
+ 'sn'
+ ]
});
return builder.build();
@@ -324,15 +325,13 @@ IPA.user_password_widget = function(spec) {
var password1 = dialog.add_field(IPA.text_widget({
name: 'password1',
label: IPA.messages.password.new_password,
- type: 'password',
- undo: false
+ type: 'password'
}));
var password2 = dialog.add_field(IPA.text_widget({
name: 'password2',
label: IPA.messages.password.verify_password,
- type: 'password',
- undo: false
+ type: 'password'
}));
dialog.add_button(IPA.messages.password.reset_password, function() {