summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-07-26 11:42:25 -0500
committerEndi S. Dewata <edewata@redhat.com>2011-07-28 00:01:27 +0000
commita9a9f00aa9a4d0b5258b5cdb08ade752ab53398b (patch)
tree25290ca955ab05b48357d2ad9e2f86b53b4db5ef /install
parentd7e790dd0710ee754ec49280910e19a8746e9b0c (diff)
downloadfreeipa-a9a9f00aa9a4d0b5258b5cdb08ade752ab53398b.tar.gz
freeipa-a9a9f00aa9a4d0b5258b5cdb08ade752ab53398b.tar.xz
freeipa-a9a9f00aa9a4d0b5258b5cdb08ade752ab53398b.zip
Fixed hard-coded labels in sudo rules.
The sudo rule interface has been modified to remove unused labels and use translated dialog box title. Ticket #1518
Diffstat (limited to 'install')
-rw-r--r--install/ui/sudo.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/install/ui/sudo.js b/install/ui/sudo.js
index 30479fb11..83467773a 100644
--- a/install/ui/sudo.js
+++ b/install/ui/sudo.js
@@ -892,25 +892,25 @@ IPA.sudo.rule_details_command_section = function(spec) {
that.add_field(IPA.rule_association_table_widget({
'id': that.entity_name+'-memberallowcmd_sudocmd',
- 'name': 'memberallowcmd_sudocmd', 'label': 'Command',
+ 'name': 'memberallowcmd_sudocmd',
'category': category,
'other_entity': 'sudocmd', 'add_method': 'add_allow_command', 'remove_method': 'remove_allow_command'
}));
that.add_field(IPA.rule_association_table_widget({
'id': that.entity_name+'-memberallowcmd_sudocmdgroup',
- 'name': 'memberallowcmd_sudocmdgroup', 'label': 'Groups',
+ 'name': 'memberallowcmd_sudocmdgroup',
'category': category,
'other_entity': 'sudocmdgroup', 'add_method': 'add_allow_command', 'remove_method': 'remove_allow_command'
}));
that.add_field(IPA.rule_association_table_widget({
'id': that.entity_name+'-memberdenycmd_sudocmd',
- 'name': 'memberdenycmd_sudocmd', 'label': 'Command',
+ 'name': 'memberdenycmd_sudocmd',
'other_entity': 'sudocmd', 'add_method': 'add_deny_command', 'remove_method': 'remove_deny_command'
}));
that.add_field(IPA.rule_association_table_widget({
'id': that.entity_name+'-memberdenycmd_sudocmdgroup',
- 'name': 'memberdenycmd_sudocmdgroup', 'label': 'Groups',
+ 'name': 'memberdenycmd_sudocmdgroup',
'other_entity': 'sudocmdgroup', 'add_method': 'add_deny_command', 'remove_method': 'remove_deny_command'
}));
@@ -1269,9 +1269,13 @@ IPA.sudorule_association_table_widget = function(spec) {
that.external = spec.external;
that.create_add_dialog = function() {
+
var pkey = IPA.nav.get_state(that.entity_name+'-pkey');
- var label = IPA.metadata.objects[that.other_entity].label;
- var title = 'Add '+label+' to '+that.entity_name+' '+pkey;
+
+ var title = IPA.messages.association.add;
+ title = title.replace('${other_entity}', IPA.metadata.objects[that.other_entity].label);
+ title = title.replace('${entity}', IPA.metadata.objects[that.entity_name].label_singular);
+ title = title.replace('${primary_key}', pkey);
return IPA.sudo.rule_association_adder_dialog({
'title': title,