survey maker for going from add/edit job template to add/edit survey maker

This commit is contained in:
Jared Tabor
2014-09-17 15:47:20 -04:00
parent b505e7ae41
commit 9520970817
4 changed files with 384 additions and 78 deletions

View File

@@ -65,7 +65,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
job_type: {
label: 'Job Type',
type: 'select',
ngOptions: 'type.label for type in job_type_options',
ngOptions: 'type.label for type in job_type_options track by type.value',
"default": 0,
addRequired: true,
editRequired: true,
@@ -106,7 +106,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
playbook: {
label: 'Playbook',
type:'select',
ngOptions: 'book for book in playbook_options',
ngOptions: 'book for book in playbook_options track by book',
id: 'playbook-select',
awRequiredWhen: {variable: "playbookrequired", init: "true" },
column: 1,
@@ -180,7 +180,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
verbosity: {
label: 'Verbosity',
type: 'select',
ngOptions: 'v.label for v in verbosity_options',
ngOptions: 'v.label for v in verbosity_options track by v.value',
"default": 0,
addRequired: true,
editRequired: true,
@@ -261,6 +261,7 @@ angular.module('JobTemplateFormDefinition', ['SchedulesListDefinition', 'Complet
editRequird: false,
trueValue: 'true',
falseValue: 'false',
ngChange: "surveyEnabled()",
column: 2,
awPopOver: "<p>If checked, user will be prompted at job launch with a series of questions related to the job.</p>",
dataPlacement: 'right',

View File

@@ -69,7 +69,7 @@ angular.module('SurveyQuestionFormDefinition', [])
realName: 'answer_type',
label: 'Answer Type',
type: 'select',
ngOptions: 'answer_types.name for answer_types in answer_types',
ngOptions: 'answer_types.name for answer_types in answer_types track by answer_types.type',
addRequired: true,
editRequired: true,
column: 1