From 47deaa702d6de630042ed7069c1b7262df32b0ad Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 6 Oct 2014 16:15:06 -0400 Subject: [PATCH] fixed default answer field in question maker. also added validation for choices if multichoice or multiselect is chosen --- awx/ui/static/js/forms/SurveyMaker.js | 37 ---------------------- awx/ui/static/js/forms/SurveyQuestion.js | 32 +++++++++++++++++-- awx/ui/static/js/helpers/Survey.js | 39 ++++++++++++++++-------- 3 files changed, 56 insertions(+), 52 deletions(-) diff --git a/awx/ui/static/js/forms/SurveyMaker.js b/awx/ui/static/js/forms/SurveyMaker.js index 9b92167d6b..507713ead9 100644 --- a/awx/ui/static/js/forms/SurveyMaker.js +++ b/awx/ui/static/js/forms/SurveyMaker.js @@ -19,23 +19,7 @@ angular.module('SurveyMakerFormDefinition', []) name: 'survey_maker', //entity or model name in singular form // // well: true, breadCrumbs: false, - // twoColumns: true, - // // collapse: true, - // collapseTitle: "Properties", - // collapseMode: 'edit', - // collapseOpen: 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' - // } - // }, fields: { survey_name: { @@ -65,28 +49,7 @@ angular.module('SurveyMakerFormDefinition', []) // capitalize: false, // // column: 1 }, - // survey_description: { - // type: 'custom', - // control: '
'+ - // '
'+ - // ''+ - // '
'+ - // '
' - // // label: 'Survey Description', - // // type: 'text', - // // addRequired: false, - // // editRequired: false, - // // column: 2 - // }, - // questions: { - // type: 'custom', - // control: ''+ - // '
'+ - // ''+ - // '
' - - // } }, buttons: { //for now always generates