diff --git a/awx/ui/client/src/license/checkLicense.factory.js b/awx/ui/client/src/license/checkLicense.factory.js index d5cbc0ed44..e76f1ea0b7 100644 --- a/awx/ui/client/src/license/checkLicense.factory.js +++ b/awx/ui/client/src/license/checkLicense.factory.js @@ -25,8 +25,8 @@ export default .then((response) =>{ return response.data; }) - .catch(() => { - return $q.reject(); + .catch(({data}) => { + return $q.reject(data); }); }, diff --git a/awx/ui/client/src/license/license.block.less b/awx/ui/client/src/license/license.block.less index b0091d71ee..415c8a1fab 100644 --- a/awx/ui/client/src/license/license.block.less +++ b/awx/ui/client/src/license/license.block.less @@ -124,8 +124,7 @@ } } -.License-submit--success, .License-submit--failure{ - line-height: 33px; +.License-submit--success, .License-submit--failure { margin: 0; } .License-file--container { diff --git a/awx/ui/client/src/license/license.controller.js b/awx/ui/client/src/license/license.controller.js index eaa0cbf3d1..40eeeff071 100644 --- a/awx/ui/client/src/license/license.controller.js +++ b/awx/ui/client/src/license/license.controller.js @@ -33,7 +33,10 @@ export default const reset = function() { document.getElementById('License-form').reset(); - $scope.rhCreds = {}; + $scope.newLicense.eula = undefined; + if (!$scope.licenseError) { + $scope.rhCreds = {}; + } }; const initVars = (config) => { @@ -176,10 +179,10 @@ export default }, 4000); } }); - }).catch(() => { + }).catch((data) => { Wait('stop'); reset(); - $scope.licenseError = true; + $scope.licenseError = data.error; }); }; }]; diff --git a/awx/ui/client/src/license/license.partial.html b/awx/ui/client/src/license/license.partial.html index cdcdacb6a2..4a6ae096cf 100644 --- a/awx/ui/client/src/license/license.partial.html +++ b/awx/ui/client/src/license/license.partial.html @@ -167,19 +167,23 @@