diff --git a/awx/ui/static/js/forms/SurveyQuestion.js b/awx/ui/static/js/forms/SurveyQuestion.js index 81d1f8a257..2217e1316c 100644 --- a/awx/ui/static/js/forms/SurveyQuestion.js +++ b/awx/ui/static/js/forms/SurveyQuestion.js @@ -15,22 +15,12 @@ angular.module('SurveyQuestionFormDefinition', []) .value('SurveyQuestionForm', { addTitle: 'Add Question', - // editTitle: '{{ survey_name }}', + editTitle: 'Edit Question', + base: 'survey_question', name: 'survey_question', well: true, twoColumns: true, - - // actions: { - // stream: { - // 'class': "btn-primary btn-xs activity-btn", - // ngClick: "showActivity()", - // awToolTip: "View Activity Stream", - // dataPlacement: "top", - // icon: "icon-comments-alt", - // mode: 'edit', - // iconSize: 'large' - // } - // }, + breadcrumbs: false, fields: { question_name: { @@ -57,13 +47,6 @@ angular.module('SurveyQuestionFormDefinition', []) addRequired: true, editRequired: true, column: 1 - // sourceModel: 'organization', - // sourceField: 'name', - // ngClick: 'lookUpOrganization()', - // awRequiredWhen: { - // variable: "organizationrequired", - // init: "true" - // } }, type: { realName: 'answer_type', @@ -75,15 +58,6 @@ angular.module('SurveyQuestionFormDefinition', []) column: 2 }, - // answer_options_text: { - // realName: 'answer_options', - // label: 'Answer Options', - // type: 'text', - // addRequired: true, - // editRequired: true, - // ngHide: 'answer_type.type!=="text" ', - // column: 1 - // }, choices: { realName: 'answer_options', label: 'Multiple Choice Options', @@ -91,41 +65,52 @@ angular.module('SurveyQuestionFormDefinition', []) rows: 3, addRequired: true, editRequired: true, - ngShow: 'type.type==="multiselect" || type.type==="multiplechoice" ', + ngRequired: "type.type=== 'multiselect' || type.type=== 'multiplechoice' " , + ngShow: 'type.type=== "multiselect" || type.type=== "multiplechoice" ', awPopOver: '
Type an option on each line.
'+ 'For example the following input:
Apple
\n Banana
\n Cherry
would be displayed as:
Insert some good JSON!
', - // dataTitle: 'Answer Options', - // dataPlacement: 'right', - // dataContainer: "body", - // column: 1 - // }, default: { realName: 'default_answer', label: 'Default Answer', @@ -148,8 +133,42 @@ angular.module('SurveyQuestionFormDefinition', []) default_int: { realName: 'default_answer', type: 'custom', - control: 'Enter inventory variables using either JSON or YAML syntax. Use the radio button to toggle between the two.
" + - // "JSON:{\n" + - // "YAML:
\"somevar\": \"somevalue\",
\"password\": \"magic\"
}
---\n" + - // '
somevar: somevalue
password: magic
View JSON examples at www.json.org
' + - // 'View YAML examples at docs.ansible.com
', - // dataTitle: 'Inventory Variables', - // dataPlacement: 'right', - // dataContainer: 'body' - // } - // }, }, buttons: { submit_question: { ngClick: 'submitQuestion()', - ngDisabled: "!question_name || !variable || !type || ((type.type==='multiplechoice' || type.type === 'multiselect' ) && !choices)", //|| type.type===multiselect ',//'!question_name || !variable || !type' , + ngDisabled: true, //'survey_question.$valid', //"!question_name || !variable || !type || ((type.type==='multiplechoice' || type.type === 'multiselect' ) && !choices)", //|| type.type===multiselect ',//'!question_name || !variable || !type' , 'class': 'btn btn-sm btn-primary', label: 'Submit Question' } - }, - - related: { - } }); \ No newline at end of file