From 16663cb215fad4e20169a97231d94d3ee9c21adf Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 12 Sep 2012 13:41:39 +0200 Subject: Make confirm_dialog a base class of revoke and restore certificate dialogs https://fedorahosted.org/freeipa/ticket/3035 --- install/ui/facet.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'install/ui/facet.js') diff --git a/install/ui/facet.js b/install/ui/facet.js index 372022db..25d48bf6 100644 --- a/install/ui/facet.js +++ b/install/ui/facet.js @@ -1323,12 +1323,12 @@ IPA.action = function(spec) { if (that.confirm_dialog) { - var dialog = IPA.build(that.confirm_dialog); - dialog.message = that.get_confirm_message(facet); - dialog.on_ok = function () { + that.dialog = IPA.build(that.confirm_dialog); + that.update_confirm_dialog(facet); + that.dialog.on_ok = function () { that.execute_action(facet, on_success, on_error); }; - dialog.open(); + that.dialog.open(); } else { var msg = that.get_confirm_message(facet); confirmed = IPA.confirm(msg); @@ -1340,6 +1340,10 @@ IPA.action = function(spec) { that.execute_action(facet, on_success, on_error); }; + that.update_confirm_dialog = function(facet) { + that.dialog.message = that.get_confirm_message(facet); + }; + that.get_confirm_message = function(facet) { return that.confirm_msg; }; -- cgit