summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/details.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-04-14 16:44:03 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-10 10:23:26 +0200
commita98df325b6b0d7bf41509e8c8247a9422f179429 (patch)
tree488c57ede5c67b122aa01f0c5eb48dcb3625144f /install/ui/src/freeipa/details.js
parentbe3aadd06ad2cdc434827e78e5227f34ecf63aa0 (diff)
downloadfreeipa-a98df325b6b0d7bf41509e8c8247a9422f179429.tar.gz
freeipa-a98df325b6b0d7bf41509e8c8247a9422f179429.tar.xz
freeipa-a98df325b6b0d7bf41509e8c8247a9422f179429.zip
webui: add confirmation to action dropdown actions
Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/details.js')
-rw-r--r--install/ui/src/freeipa/details.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/install/ui/src/freeipa/details.js b/install/ui/src/freeipa/details.js
index 030c32395..b0d330466 100644
--- a/install/ui/src/freeipa/details.js
+++ b/install/ui/src/freeipa/details.js
@@ -1857,7 +1857,7 @@ exp.object_action = IPA.object_action = function(spec) {
* @inheritDoc
*/
that.get_confirm_message = function(facet) {
- var pkey = that.get_pkey();
+ var pkey = facet.get_pkey();
var msg = that.confirm_msg.replace('${object}', pkey);
return msg;
};
@@ -1878,6 +1878,7 @@ exp.enable_action = IPA.enable_action = function(spec) {
spec = spec || {};
spec.name = spec.name || 'enable';
spec.method = spec.method || 'enable';
+ spec.needs_confirm = spec.needs_confirm !== undefined ? spec.needs_confirm : true;
spec.confirm_msg = spec.confirm_msg || '@i18n:actions.enable_confirm';
spec.label = spec.label || '@i18n:buttons.enable';
spec.disable_cond = spec.disable_cond || ['enabled'];
@@ -1898,6 +1899,7 @@ exp.disable_action = IPA.disable_action = function(spec) {
spec = spec || {};
spec.name = spec.name || 'disable';
spec.method = spec.method || 'disable';
+ spec.needs_confirm = spec.needs_confirm !== undefined ? spec.needs_confirm : true;
spec.confirm_msg = spec.confirm_msg || '@i18n:actions.disable_confirm';
spec.label = spec.label || '@i18n:buttons.disable';
spec.enable_cond = spec.enable_cond || ['enabled'];
@@ -1921,6 +1923,7 @@ exp.delete_action = IPA.delete_action = function(spec) {
spec = spec || {};
spec.name = spec.name || 'delete';
spec.method = spec.method || 'del';
+ spec.needs_confirm = spec.needs_confirm !== undefined ? spec.needs_confirm : true;
spec.confirm_msg = spec.confirm_msg || '@i18n:actions.delete_confirm';
spec.label = spec.label || '@i18n:buttons.remove';