From e39a109060ce8b92919c00aebd83a682a039d9b5 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 18 Sep 2012 17:12:59 +0200 Subject: Show trust status in add success notification Web UI notification of 'Add verification step after trust creation' https://fedorahosted.org/freeipa/ticket/2763 --- install/ui/trust.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'install/ui/trust.js') diff --git a/install/ui/trust.js b/install/ui/trust.js index 77e7cb38..939bb59a 100644 --- a/install/ui/trust.js +++ b/install/ui/trust.js @@ -71,6 +71,7 @@ IPA.trust.entity = function(spec) { ] }). adder_dialog({ + factory: IPA.trust.adder_dialog, fields: [ { name: 'cn', @@ -162,4 +163,21 @@ IPA.trust.entity = function(spec) { return that; }; +IPA.trust.adder_dialog = function(spec) { + + spec = spec || {}; + + var that = IPA.entity_adder_dialog(spec); + + that.get_success_message = function(data) { + return that.entity_adder_dialog_get_success_message(data) + '. ' + data.result.result.truststatus[0]; + }; + + that.notify_success = function(data) { + IPA.notify_success(that.get_success_message(data), 5000); + }; + + return that; +}; + IPA.register('trust', IPA.trust.entity); -- cgit