diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2015-06-18 12:59:05 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2015-06-18 15:50:44 +0200 |
commit | baca55c665b2bdfa5cb9a6ad88daeccef0500999 (patch) | |
tree | ed676d2c042bdd03618b4da0188f4110bb3d9e99 /install | |
parent | 1d608251383e4842b89c941a76dbd13529558f42 (diff) | |
download | freeipa-baca55c665b2bdfa5cb9a6ad88daeccef0500999.tar.gz freeipa-baca55c665b2bdfa5cb9a6ad88daeccef0500999.tar.xz freeipa-baca55c665b2bdfa5cb9a6ad88daeccef0500999.zip |
webui: adjust user deleter dialog to new api
In user_del, flags 'permanently' and 'preserve' were replaced with single
bool option 'preserve'
part of: https://fedorahosted.org/freeipa/ticket/3813
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/src/freeipa/user.js | 22 | ||||
-rw-r--r-- | install/ui/src/freeipa/widget.js | 4 | ||||
-rw-r--r-- | install/ui/test/data/ipa_init.json | 3 |
3 files changed, 15 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}", |