Merge pull request #194 from marshmalien/fix/6078-credential-tooltip-content

Pull Credential input and injector help_text from API
This commit is contained in:
Marliana Lara 2017-08-07 10:23:03 -04:00 committed by GitHub
commit 085a722060
4 changed files with 9 additions and 3 deletions

View File

@ -37,6 +37,9 @@ export default ['Rest', 'Wait',
callback: 'loadCredentialKindOptions'
});
$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("^");
Alert('Permission Error', 'You do not have permission to add a credential type.', 'alert-info');

View File

@ -43,7 +43,7 @@ export default ['i18n', function(i18n) {
default: '---',
showParseTypeToggle: true,
parseTypeName: 'parseTypeInputs',
awPopOver: i18n._("Enter inputs using either JSON or YAML syntax. Use the radio button to toggle between the two. Refer to the Ansible Tower documentation for example syntax."),
awPopOverWatch: "inputs_help_text",
dataTitle: i18n._('Input Configuration'),
dataPlacement: 'right',
dataContainer: "body",
@ -57,7 +57,7 @@ export default ['i18n', function(i18n) {
default: '---',
showParseTypeToggle: true,
parseTypeName: 'parseTypeInjectors',
awPopOver: i18n._("Enter injectors using either JSON or YAML syntax. Use the radio button to toggle between the two. Refer to the Ansible Tower documentation for example syntax."),
awPopOverWatch: "injectors_help_text",
dataTitle: i18n._('Injector Configuration'),
dataPlacement: 'right',
dataContainer: "body",

View File

@ -35,6 +35,9 @@ export default ['Rest', 'Wait',
options: options,
callback: 'choicesReadyCredentialTypes'
});
$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");
});
}

View File

@ -658,7 +658,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
} else {
html += "\t\t<span class=\"Form-inputLabel\">\n\t\t\t" + field.label + "\n\t\t</span>";
}
html += (field.awPopOver && !field.awPopOverRight) ? Attr(field, 'awPopOver', fld) : "";
html += ((field.awPopOver || field.awPopOverWatch) && !field.awPopOverRight) ? Attr(field, 'awPopOver', fld) : "";
html += (field.hintText) ? "\n\t\t<span class=\"label-hint-text\">\n\t\t\t<i class=\"fa fa-info-circle\">\n\t\t\t</i>\n\t\t\tHint: " + field.hintText + "\n\t\t</span>" : "";
// Variable editing
if (fld === "variables" || fld === "extra_vars" || _.last(fld.split('_')) === 'variables' || fld === 'source_vars' || field.showParseTypeToggle === true) {