diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index 7ecf025b0e..a39d1c98f9 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -52,6 +52,7 @@ angular.module('SurveyQuestionFormDefinition', []) realName: 'answer_type', label: 'Answer Type', type: 'select', + defaultText: 'Choose an answer type', ngOptions: 'answer_types.name for answer_types in answer_types track by answer_types.type', addRequired: true, editRequired: true, diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js index fccae33b21..facf8768d5 100644 --- a/awx/ui/static/lib/ansible/form-generator.js +++ b/awx/ui/static/lib/ansible/form-generator.js @@ -77,6 +77,7 @@ * | dataPlacement | Used with awPopOver and awToolTip. String providing the placement parameter (i.e. left, right, top, bottom, etc.). | * | dataTitle | Used with awPopOver. String value for the title of the popover. | * | default | Default value to place in the field when the form is in 'add' mode. | + * | defaultText | Default value to put into a select input. | * | editRequird | true or false. If true, set the required attribute when mode is 'edit'. | * | falseValue | For radio buttons and checkboxes. Value to set the model to when the checkbox or radio button is not selected. | * | genMD5 | true or false. If true, places the field in an input group with a button that when clicked replaces the field contents with an MD5 has key. Used with host_config_key on the job templates detail page. | @@ -907,15 +908,11 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'Utilities', 'ListGenerator field.awRequiredWhen.variable + "\" " : ""; html += ">\n"; html += "\n"; html += "\n"; - // Add error messages + // Add error messages if ((options.mode === 'add' && field.addRequired) || (options.mode === 'edit' && field.editRequired) || field.awRequiredWhen) { html += "