From 5d68b20554d2e74b97b15e95639bf4d20fa16610 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Fri, 4 Aug 2017 17:41:45 -0400 Subject: [PATCH] Provide default values for help text labels --- awx/ui/client/src/credential-types/add/add.controller.js | 4 ++-- awx/ui/client/src/credential-types/edit/edit.controller.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/credential-types/add/add.controller.js b/awx/ui/client/src/credential-types/add/add.controller.js index 3b4e1f6d1f..bc7e284fd2 100644 --- a/awx/ui/client/src/credential-types/add/add.controller.js +++ b/awx/ui/client/src/credential-types/add/add.controller.js @@ -37,8 +37,8 @@ export default ['Rest', 'Wait', callback: 'loadCredentialKindOptions' }); - $scope.inputs_help_text = options.actions.POST.inputs.help_text; - $scope.injectors_help_text = options.actions.POST.injectors.help_text; + $scope.inputs_help_text = _.get(options, 'actions.POST.inputs.help_text', "Specification for credential type inputs"); + $scope.injectors_help_text = _.get(options, 'actions.POST.injectors.help_text', "Specification for credential type injector"); if (!options.actions.POST) { $state.go("^"); diff --git a/awx/ui/client/src/credential-types/edit/edit.controller.js b/awx/ui/client/src/credential-types/edit/edit.controller.js index 1ecef2061e..42cd0ebadd 100644 --- a/awx/ui/client/src/credential-types/edit/edit.controller.js +++ b/awx/ui/client/src/credential-types/edit/edit.controller.js @@ -36,8 +36,8 @@ export default ['Rest', 'Wait', callback: 'choicesReadyCredentialTypes' }); - $scope.inputs_help_text = options.actions.POST.inputs.help_text; - $scope.injectors_help_text = options.actions.POST.injectors.help_text; + $scope.inputs_help_text = _.get(options, 'actions.POST.inputs.help_text', "Specification for credential type inputs"); + $scope.injectors_help_text = _.get(options, 'actions.POST.injectors.help_text', "Specification for credential type injector"); }); }