mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
@@ -69,22 +69,18 @@ IPA.entity_factories.permission = function() {
|
|||||||
{
|
{
|
||||||
name: 'general',
|
name: 'general',
|
||||||
fields: [
|
fields: [
|
||||||
{
|
'cn',
|
||||||
name: 'cn',
|
|
||||||
undo: false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
factory: IPA.rights_widget,
|
factory: IPA.rights_widget,
|
||||||
name: 'permissions',
|
name: 'permissions',
|
||||||
join: true, undo: false
|
join: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
factory: IPA.target_section,
|
factory: IPA.target_section,
|
||||||
name: 'target',
|
name: 'target',
|
||||||
label: IPA.messages.objects.permission.target,
|
label: IPA.messages.objects.permission.target
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}).
|
}).
|
||||||
@@ -173,8 +169,7 @@ IPA.entity_factories.selfservice = function() {
|
|||||||
'aciname',
|
'aciname',
|
||||||
{factory:IPA.attributes_widget,
|
{factory:IPA.attributes_widget,
|
||||||
object_type:'user',
|
object_type:'user',
|
||||||
name:'attrs',
|
name:'attrs'
|
||||||
undo: false
|
|
||||||
}]
|
}]
|
||||||
}).
|
}).
|
||||||
build();
|
build();
|
||||||
@@ -218,21 +213,20 @@ IPA.entity_factories.delegation = function() {
|
|||||||
factory: IPA.entity_select_widget,
|
factory: IPA.entity_select_widget,
|
||||||
name: 'group',
|
name: 'group',
|
||||||
other_entity: 'group',
|
other_entity: 'group',
|
||||||
other_field: 'cn',
|
other_field: 'cn'
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
factory: IPA.entity_select_widget,
|
factory: IPA.entity_select_widget,
|
||||||
name: 'memberof',
|
name: 'memberof',
|
||||||
other_entity: 'group',
|
other_entity: 'group',
|
||||||
other_field: 'cn',
|
other_field: 'cn',
|
||||||
join: true,
|
join: true
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
factory:IPA.attributes_widget,
|
factory: IPA.attributes_widget,
|
||||||
name: 'attrs', object_type: 'user',
|
name: 'attrs',
|
||||||
join: true, undo: false
|
object_type: 'user',
|
||||||
|
join: true
|
||||||
}]
|
}]
|
||||||
}).
|
}).
|
||||||
build();
|
build();
|
||||||
@@ -400,7 +394,6 @@ IPA.target_section = function(spec) {
|
|||||||
spec = spec || {};
|
spec = spec || {};
|
||||||
|
|
||||||
var that = IPA.details_section(spec);
|
var that = IPA.details_section(spec);
|
||||||
that.undo = typeof spec.undo == 'undefined' ? true : spec.undo;
|
|
||||||
|
|
||||||
var target_types = [
|
var target_types = [
|
||||||
{
|
{
|
||||||
@@ -504,31 +497,26 @@ IPA.target_section = function(spec) {
|
|||||||
var init = function() {
|
var init = function() {
|
||||||
that.filter_text = IPA.text_widget({
|
that.filter_text = IPA.text_widget({
|
||||||
name: 'filter',
|
name: 'filter',
|
||||||
undo: that.undo,
|
|
||||||
entity: spec.entity
|
entity: spec.entity
|
||||||
});
|
});
|
||||||
that.subtree_textarea = IPA.textarea_widget({
|
that.subtree_textarea = IPA.textarea_widget({
|
||||||
entity: spec.entity,
|
entity: spec.entity,
|
||||||
name: 'subtree',
|
name: 'subtree',
|
||||||
cols: 30, rows: 1,
|
cols: 30, rows: 1
|
||||||
undo: that.undo
|
|
||||||
});
|
});
|
||||||
that.group_select = IPA.entity_select_widget({
|
that.group_select = IPA.entity_select_widget({
|
||||||
entity: spec.entity,
|
entity: spec.entity,
|
||||||
name: 'targetgroup',
|
name: 'targetgroup',
|
||||||
other_entity: 'group',
|
other_entity: 'group',
|
||||||
other_field: 'cn',
|
other_field: 'cn'
|
||||||
undo: that.undo
|
|
||||||
});
|
});
|
||||||
that.type_select = IPA.select_widget({
|
that.type_select = IPA.select_widget({
|
||||||
entity: spec.entity,
|
entity: spec.entity,
|
||||||
name: 'type',
|
name: 'type'
|
||||||
undo: that.undo
|
|
||||||
});
|
});
|
||||||
that.attribute_table = IPA.attributes_widget({
|
that.attribute_table = IPA.attributes_widget({
|
||||||
entity: spec.entity,
|
entity: spec.entity,
|
||||||
name: 'attrs',
|
name: 'attrs'
|
||||||
undo: that.undo
|
|
||||||
});
|
});
|
||||||
|
|
||||||
that.add_field(that.filter_text);
|
that.add_field(that.filter_text);
|
||||||
|
|||||||
@@ -104,17 +104,10 @@ IPA.entity_factories.automountmap = function() {
|
|||||||
value: 'add_indirect',
|
value: 'add_indirect',
|
||||||
label: IPA.messages.objects.automountmap.indirect
|
label: IPA.messages.objects.automountmap.indirect
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
'automountmapname',
|
||||||
name: 'automountmapname',
|
'description'
|
||||||
undo: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'description',
|
|
||||||
undo: false
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -123,14 +116,12 @@ IPA.entity_factories.automountmap = function() {
|
|||||||
{
|
{
|
||||||
name: 'key',
|
name: 'key',
|
||||||
label: IPA.get_method_option(
|
label: IPA.get_method_option(
|
||||||
'automountmap_add_indirect', 'key').label,
|
'automountmap_add_indirect', 'key').label
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'parentmap',
|
name: 'parentmap',
|
||||||
label: IPA.get_method_option(
|
label: IPA.get_method_option(
|
||||||
'automountmap_add_indirect', 'parentmap').label,
|
'automountmap_add_indirect', 'parentmap').label
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,15 +93,13 @@ IPA.entity_factories.dnszone = function() {
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'idnsname',
|
name: 'idnsname',
|
||||||
optional: true,
|
optional: true
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
'name_from_ip',
|
'name_from_ip',
|
||||||
'idnssoamname',
|
'idnssoamname',
|
||||||
{
|
{
|
||||||
name: 'idnssoarname',
|
name: 'idnssoarname',
|
||||||
optional: true,
|
optional: true
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
factory: IPA.force_dnszone_add_checkbox_widget,
|
factory: IPA.force_dnszone_add_checkbox_widget,
|
||||||
@@ -583,28 +581,26 @@ IPA.entity_factories.dnsrecord = function() {
|
|||||||
]
|
]
|
||||||
}).
|
}).
|
||||||
adder_dialog({
|
adder_dialog({
|
||||||
pre_execute_hook:function(command){
|
pre_execute_hook: function(command) {
|
||||||
var record_type = command.options.record_type;
|
var record_type = command.options.record_type;
|
||||||
var record_data = command.options.record_data;
|
var record_data = command.options.record_data;
|
||||||
|
|
||||||
delete command.options.record_type;
|
delete command.options.record_type;
|
||||||
delete command.options.record_data;
|
delete command.options.record_data;
|
||||||
command.options[record_type] = record_data;
|
command.options[record_type] = record_data;
|
||||||
},
|
},
|
||||||
fields: [
|
fields: [
|
||||||
'idnsname',
|
'idnsname',
|
||||||
{
|
{
|
||||||
name:'record_type',
|
name: 'record_type',
|
||||||
label:IPA.messages.objects.dnsrecord.type,
|
label: IPA.messages.objects.dnsrecord.type,
|
||||||
factory:IPA.dnsrecord_type_widget,
|
factory: IPA.dnsrecord_type_widget
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:'record_data',
|
name: 'record_data',
|
||||||
label:IPA.messages.objects.dnsrecord.data,
|
label: IPA.messages.objects.dnsrecord.data,
|
||||||
factory:IPA.text_widget,
|
factory: IPA.text_widget,
|
||||||
param_info:{required:true},
|
param_info: {required:true}
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}).
|
}).
|
||||||
@@ -670,7 +666,6 @@ IPA.force_dnszone_add_checkbox_widget = function(spec) {
|
|||||||
var param_info = IPA.get_method_option('dnszone_add', spec.name);
|
var param_info = IPA.get_method_option('dnszone_add', spec.name);
|
||||||
spec.label = param_info.label;
|
spec.label = param_info.label;
|
||||||
spec.tooltip = param_info.doc;
|
spec.tooltip = param_info.doc;
|
||||||
spec.undo = false;
|
|
||||||
return IPA.checkbox_widget(spec);
|
return IPA.checkbox_widget(spec);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -120,20 +120,17 @@ IPA.entity_factories.entitle = function() {
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'username',
|
name: 'username',
|
||||||
label: IPA.get_method_arg('entitle_register', 'username').label,
|
label: IPA.get_method_arg('entitle_register', 'username').label
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'password',
|
name: 'password',
|
||||||
label: IPA.get_method_option('entitle_register', 'password').label,
|
label: IPA.get_method_option('entitle_register', 'password').label,
|
||||||
type: 'password',
|
type: 'password'
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
/* currently not supported
|
/* currently not supported
|
||||||
, {
|
, {
|
||||||
name: 'ipaentitlementid',
|
name: 'ipaentitlementid',
|
||||||
label: IPA.get_method_option('entitle_register', 'ipaentitlementid').label,
|
label: IPA.get_method_option('entitle_register', 'ipaentitlementid').label
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
]
|
]
|
||||||
@@ -146,8 +143,7 @@ IPA.entity_factories.entitle = function() {
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'certificate',
|
name: 'certificate',
|
||||||
label: IPA.messages.objects.entitle.certificate,
|
label: IPA.messages.objects.entitle.certificate
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}).
|
}).
|
||||||
@@ -159,7 +155,6 @@ IPA.entity_factories.entitle = function() {
|
|||||||
{
|
{
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
label: IPA.get_method_arg('entitle_consume', 'quantity').label,
|
label: IPA.get_method_arg('entitle_consume', 'quantity').label,
|
||||||
undo: false,
|
|
||||||
metadata: IPA.get_method_arg('entitle_consume', 'quantity')
|
metadata: IPA.get_method_arg('entitle_consume', 'quantity')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -172,8 +167,7 @@ IPA.entity_factories.entitle = function() {
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'certificate',
|
name: 'certificate',
|
||||||
label: IPA.messages.objects.entitle.certificate,
|
label: IPA.messages.objects.entitle.certificate
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ IPA.entity_factories.group = function () {
|
|||||||
factory: IPA.group_nonposix_checkbox_widget,
|
factory: IPA.group_nonposix_checkbox_widget,
|
||||||
name: 'nonposix',
|
name: 'nonposix',
|
||||||
label: IPA.messages.objects.group.posix,
|
label: IPA.messages.objects.group.posix,
|
||||||
undo: false,
|
|
||||||
checked: true
|
checked: true
|
||||||
},
|
},
|
||||||
'gidnumber']
|
'gidnumber']
|
||||||
|
|||||||
@@ -134,8 +134,7 @@ IPA.entity_factories.host = function () {
|
|||||||
factory: IPA.text_widget,
|
factory: IPA.text_widget,
|
||||||
name: 'hostname',
|
name: 'hostname',
|
||||||
label: IPA.messages.objects.service.host,
|
label: IPA.messages.objects.service.host,
|
||||||
param_info: { required: true },
|
param_info: { required: true }
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
factory: IPA.dnszone_select_widget,
|
factory: IPA.dnszone_select_widget,
|
||||||
@@ -143,8 +142,7 @@ IPA.entity_factories.host = function () {
|
|||||||
label: IPA.metadata.objects.dnszone.label_singular,
|
label: IPA.metadata.objects.dnszone.label_singular,
|
||||||
editable: true,
|
editable: true,
|
||||||
empty_option: false,
|
empty_option: false,
|
||||||
param_info: { required: true },
|
param_info: { required: true }
|
||||||
undo: false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -154,8 +152,7 @@ IPA.entity_factories.host = function () {
|
|||||||
{
|
{
|
||||||
factory: IPA.text_widget,
|
factory: IPA.text_widget,
|
||||||
name: 'ip_address',
|
name: 'ip_address',
|
||||||
param_info: IPA.get_method_option('host_add', 'ip_address'),
|
param_info: IPA.get_method_option('host_add', 'ip_address')
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
factory: IPA.force_host_add_checkbox_widget,
|
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);
|
var param_info = IPA.get_method_option('host_add', spec.name);
|
||||||
spec.label = param_info.label;
|
spec.label = param_info.label;
|
||||||
spec.tooltip = param_info.doc;
|
spec.tooltip = param_info.doc;
|
||||||
spec.undo = false;
|
|
||||||
return IPA.checkbox_widget(spec);
|
return IPA.checkbox_widget(spec);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -630,15 +626,13 @@ IPA.host_password_widget = function(spec) {
|
|||||||
var password1 = dialog.add_field(IPA.text_widget({
|
var password1 = dialog.add_field(IPA.text_widget({
|
||||||
name: 'password1',
|
name: 'password1',
|
||||||
label: IPA.messages.password.new_password,
|
label: IPA.messages.password.new_password,
|
||||||
type: 'password',
|
type: 'password'
|
||||||
undo: false
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var password2 = dialog.add_field(IPA.text_widget({
|
var password2 = dialog.add_field(IPA.text_widget({
|
||||||
name: 'password2',
|
name: 'password2',
|
||||||
label: IPA.messages.password.verify_password,
|
label: IPA.messages.password.verify_password,
|
||||||
type: 'password',
|
type: 'password'
|
||||||
undo: false
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
dialog.add_button(label, function() {
|
dialog.add_button(label, function() {
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ IPA.entity_factories.pwpolicy = function() {
|
|||||||
factory: IPA.entity_select_widget,
|
factory: IPA.entity_select_widget,
|
||||||
name: 'cn',
|
name: 'cn',
|
||||||
other_entity: 'group',
|
other_entity: 'group',
|
||||||
other_field: 'cn',
|
other_field: 'cn'
|
||||||
undo: false
|
|
||||||
},
|
},
|
||||||
'cospriority'],
|
'cospriority'],
|
||||||
width: 400,
|
width: 400,
|
||||||
|
|||||||
@@ -119,8 +119,7 @@ IPA.service_add_dialog = function(spec) {
|
|||||||
label: IPA.messages.objects.service.service,
|
label: IPA.messages.objects.service.service,
|
||||||
size: 20,
|
size: 20,
|
||||||
entity: spec.entity,
|
entity: spec.entity,
|
||||||
param_info: { required: true },
|
param_info: { required: true }
|
||||||
undo: false
|
|
||||||
})).
|
})).
|
||||||
field(IPA.entity_select_widget({
|
field(IPA.entity_select_widget({
|
||||||
name: 'host',
|
name: 'host',
|
||||||
@@ -128,14 +127,12 @@ IPA.service_add_dialog = function(spec) {
|
|||||||
other_field: 'fqdn',
|
other_field: 'fqdn',
|
||||||
entity: spec.entity,
|
entity: spec.entity,
|
||||||
label: IPA.messages.objects.service.host,
|
label: IPA.messages.objects.service.host,
|
||||||
param_info: { required: true },
|
param_info: { required: true }
|
||||||
undo: false
|
|
||||||
})).
|
})).
|
||||||
field(IPA.checkbox_widget({
|
field(IPA.checkbox_widget({
|
||||||
name: 'force',
|
name: 'force',
|
||||||
entity: spec.entity,
|
entity: spec.entity,
|
||||||
param_info: IPA.get_method_option('service_add', 'force'),
|
param_info: IPA.get_method_option('service_add', 'force')
|
||||||
undo: false
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -570,8 +570,7 @@ IPA.sudo.options_section = function(spec) {
|
|||||||
|
|
||||||
var ipasudoopt = dialog.add_field(IPA.text_widget({
|
var ipasudoopt = dialog.add_field(IPA.text_widget({
|
||||||
name: 'ipasudoopt',
|
name: 'ipasudoopt',
|
||||||
label: label,
|
label: label
|
||||||
undo: false
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
dialog.add_button(IPA.messages.buttons.add, function() {
|
dialog.add_button(IPA.messages.buttons.add, function() {
|
||||||
|
|||||||
@@ -142,11 +142,12 @@ IPA.entity_factories.user = function() {
|
|||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
factory : IPA.text_widget,
|
factory : IPA.text_widget,
|
||||||
undo: false,
|
|
||||||
optional: true,
|
optional: true,
|
||||||
name:'uid'
|
name:'uid'
|
||||||
},
|
},
|
||||||
'givenname', 'sn']
|
'givenname',
|
||||||
|
'sn'
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
@@ -324,15 +325,13 @@ IPA.user_password_widget = function(spec) {
|
|||||||
var password1 = dialog.add_field(IPA.text_widget({
|
var password1 = dialog.add_field(IPA.text_widget({
|
||||||
name: 'password1',
|
name: 'password1',
|
||||||
label: IPA.messages.password.new_password,
|
label: IPA.messages.password.new_password,
|
||||||
type: 'password',
|
type: 'password'
|
||||||
undo: false
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
var password2 = dialog.add_field(IPA.text_widget({
|
var password2 = dialog.add_field(IPA.text_widget({
|
||||||
name: 'password2',
|
name: 'password2',
|
||||||
label: IPA.messages.password.verify_password,
|
label: IPA.messages.password.verify_password,
|
||||||
type: 'password',
|
type: 'password'
|
||||||
undo: false
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
dialog.add_button(IPA.messages.password.reset_password, function() {
|
dialog.add_button(IPA.messages.password.reset_password, function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user