From 4b888039d417bda66d425f920ed26e6a404fa008 Mon Sep 17 00:00:00 2001 From: jaredevantabor Date: Mon, 6 Mar 2017 11:46:27 -0800 Subject: [PATCH] changing text of BROWSE button when image is already uploaded --- awx/ui/client/src/shared/directives.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/awx/ui/client/src/shared/directives.js b/awx/ui/client/src/shared/directives.js index 8ea5d37105..51b767bd83 100644 --- a/awx/ui/client/src/shared/directives.js +++ b/awx/ui/client/src/shared/directives.js @@ -169,6 +169,15 @@ function(ConfigurationUtils, i18n, $rootScope) { scope.imageData = $rootScope.custom_logo; }); + scope.$watch('imagePresent', () => { + if(!scope.imagePresent){ + filePickerButton.html(browseText); + } + else{ + filePickerButton.html(removeText); + } + }); + scope.$on(fieldKey+'_reverted', function(e) { scope.update(e, true); });