summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/ui/src/freeipa/user.js22
-rw-r--r--install/ui/src/freeipa/widget.js4
-rw-r--r--install/ui/test/data/ipa_init.json3
-rw-r--r--ipalib/plugins/internal.py3
4 files changed, 18 insertions, 14 deletions
diff --git a/install/ui/src/freeipa/user.js b/install/ui/src/freeipa/user.js
index 09336c3cf..bf84ba3ac 100644
--- a/install/ui/src/freeipa/user.js
+++ b/install/ui/src/freeipa/user.js
@@ -833,13 +833,13 @@ IPA.user.deleter_dialog = function(spec) {
});
that.option_radio = IPA.radio_widget({
- name: 'deletemode',
- label: 'Delete mode',
+ name: 'preserve',
+ label: '@i18n:objects.user.delete_mode',
options: [
- { label: 'default', value: '' },
- { label: 'delete permanently', value: 'permanently' },
- { label: 'preserve', value: 'preserve' }
- ]
+ { label: '@i18n:objects.user.mode_delete', value: 'false' },
+ { label: '@i18n:objects.user.mode_preserve', value: 'true' }
+ ],
+ default_value: 'false'
});
var html = that.option_layout.create([that.option_radio]);
@@ -849,13 +849,11 @@ IPA.user.deleter_dialog = function(spec) {
that.create_command = function() {
var batch = that.search_deleter_dialog_create_command();
- var option = that.option_radio.get_value()[0];
+ var preserve = that.option_radio.get_value()[0];
- if (option) {
- for (var i=0; i<batch.commands.length; i++) {
- var command = batch.commands[i];
- command.set_option(option, true);
- }
+ for (var i=0; i<batch.commands.length; i++) {
+ var command = batch.commands[i];
+ command.set_option('preserve', preserve);
}
return batch;
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js
index e985cff22..434a4b1bb 100644
--- a/install/ui/src/freeipa/widget.js
+++ b/install/ui/src/freeipa/widget.js
@@ -1425,8 +1425,8 @@ IPA.option_widget_base = function(spec, that) {
// classic properties
that.name = spec.name;
- that.label = spec.label;
- that.title = spec.title;
+ that.label = text.get(spec.label);
+ that.title = text.get(spec.title);
that.sort = spec.sort === undefined ? false : spec.sort;
that.value_changed = that.value_changed || IPA.observer();
diff --git a/install/ui/test/data/ipa_init.json b/install/ui/test/data/ipa_init.json
index e5d306cd0..1290db2c4 100644
--- a/install/ui/test/data/ipa_init.json
+++ b/install/ui/test/data/ipa_init.json
@@ -578,11 +578,14 @@
"account_status": "Account Status",
"activeuser_label": "Active users",
"contact": "Contact Settings",
+ "delete_mode": "Delete mode",
"employee": "Employee Information",
"error_changing_status": "Error changing account status",
"krbpasswordexpiration": "Password expiration",
"mailing": "Mailing Address",
"misc": "Misc. Information",
+ "mode_delete": "delete",
+ "mode_preserve": "preserve",
"noprivate": "No private group",
"status_confirmation": "Are you sure you want to ${action} the user?<br/>The change will take effect immediately.",
"status_link": "Click to ${action}",
diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py
index ff096616d..270a228b2 100644
--- a/ipalib/plugins/internal.py
+++ b/ipalib/plugins/internal.py
@@ -724,11 +724,14 @@ class i18n_messages(Command):
"account_status": _("Account Status"),
"activeuser_label": _("Active users"),
"contact": _("Contact Settings"),
+ "delete_mode": _("Delete mode"),
"employee": _("Employee Information"),
"error_changing_status": _("Error changing account status"),
"krbpasswordexpiration": _("Password expiration"),
"mailing": _("Mailing Address"),
"misc": _("Misc. Information"),
+ "mode_delete": _("delete"),
+ "mode_preserve": _("preserve"),
"noprivate": _("No private group"),
"status_confirmation": _("Are you sure you want to ${action} the user?<br/>The change will take effect immediately."),
"status_link": _("Click to ${action}"),