diff --git a/awx/ui/client/src/shared/form-generator.js b/awx/ui/client/src/shared/form-generator.js index 7398d430a2..a916815bd6 100644 --- a/awx/ui/client/src/shared/form-generator.js +++ b/awx/ui/client/src/shared/form-generator.js @@ -684,10 +684,6 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat html += createCheckbox(options.checkbox); } - if (options && options.helpertext) { - html += createHelpertext(options.helpertext); - } - if (field.labelAction) { let action = field.labelAction; let href = action.href || ""; @@ -1045,14 +1041,12 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat }; } - if (field.helperText) { - labelOptions.helpertext = { - id: `${this.form.name}_${fld}_sub_text`, - ngShow: field.helperText.ngShow, - ngModel: field.helperText.variable, - ngClass: field.helperText.ngClass, - classCondition: field.helperText.classCondition, - text: field.helperText.text + if (field.onError) { + labelOptions.onError = { + id: `${this.form.name}_${fld}_error_text`, + ngShow: field.onError.ngShow, + ngModel: field.onError.variable, + text: field.onError.text }; } @@ -1106,7 +1100,10 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat } html += "\n"; } - html += "
\n"; + if (field.label === "Labels") { + html += `" + i18n._("Optional labels that describe this job template, such as 'dev' or 'test'. Labels can be used to group and filter job templates and completed jobs.") + "
", dataContainer: 'body', - helperText: { - classCondition: 'job_template_labels_isValid === true', - ngClass: 'at-InputLabel--error', + onError: { ngShow: 'job_template_labels_isValid !== true', text: i18n._('Max 512 Characters'), },