diff --git a/app/partials/sfox/link.pug b/app/partials/sfox/link.pug index 8438ad80f3..e0a8a0b038 100644 --- a/app/partials/sfox/link.pug +++ b/app/partials/sfox/link.pug @@ -44,6 +44,7 @@ scrolling = 'no' id='plaid' ) + button.btn.button-primary.full(ng-if="state.plaid.enabled" ng-disabled="state.plaid.enabled") Sign In To Your Bank Account .mvvl(ng-if="!inMobileBuy") span.or-horizontal.flex-justify(translate="OR") button.btn.button-primary-inverse.full(translate="Manually Enter Account & Routing Numbers" ng-hide="state.enableBankAccountForm" ng-click="state.enableBankAccountForm = true") diff --git a/helperApp/plaid/plaid.controller.js b/helperApp/plaid/plaid.controller.js index 8397ac5681..817c67ae4b 100644 --- a/helperApp/plaid/plaid.controller.js +++ b/helperApp/plaid/plaid.controller.js @@ -16,15 +16,18 @@ function PlaidController ($scope, $routeParams) { key: $routeParams.apiKey, onLoad: function () {}, onExit: function () { + $scope.hideButton = false; $scope.$root.$apply(); window.parent.postMessage({from: 'plaid', to: 'exchange', command: 'disablePlaid'}, parentUrl); }, onSuccess: function (public_token, metadata) { + $scope.hideButton = false; $scope.$root.$apply(); window.parent.postMessage({from: 'plaid', to: 'exchange', command: 'getBankAccounts', msg: public_token}, parentUrl); } }); $scope.enablePlaid = () => { window.parent.postMessage({from: 'plaid', to: 'exchange', command: 'enablePlaid'}, parentUrl); + $scope.hideButton = true; linkHandler.open(); }; } diff --git a/helperApp/plaid/plaid.scss b/helperApp/plaid/plaid.scss index 2831502dc2..4a045aade7 100644 --- a/helperApp/plaid/plaid.scss +++ b/helperApp/plaid/plaid.scss @@ -10,3 +10,7 @@ body { margin: 0px; } + +.ng-hide { + display: none; +} diff --git a/helperApp/plaid/routes.config.js b/helperApp/plaid/routes.config.js index ee8169b505..ecdd927920 100644 --- a/helperApp/plaid/routes.config.js +++ b/helperApp/plaid/routes.config.js @@ -7,7 +7,7 @@ function RoutesConfig ($routeProvider) { }) .when('/key/:apiKey/env/:env', { controller: 'PlaidController', - template: '' + template: '' }) .otherwise({ redirectTo: '/'