From 9c80dba4a2511f85b423200b0209e7de7b220ac2 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 5 Dec 2014 12:14:08 -0500 Subject: [PATCH] Survey maker type change fix Made all custom fields set to pristine state when the user changes the question type --- awx/ui/static/js/helpers/Survey.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js index 0b6818bbdb..cce28947d8 100644 --- a/awx/ui/static/js/helpers/Survey.js +++ b/awx/ui/static/js/helpers/Survey.js @@ -652,7 +652,6 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', scope.default_float = ""; scope.default_int = ""; scope.default_textarea = ""; - scope.survey_question_form.choices.$setPristine(); scope.choices = ""; scope.text_min = ""; scope.text_max = "" ; @@ -662,6 +661,12 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', scope.int_max = ""; scope.float_min = ""; scope.float_max = ""; + scope.survey_question_form.default.$setPristine(); + scope.survey_question_form.default_multiselect.$setPristine(); + scope.survey_question_form.default_float.$setPristine(); + scope.survey_question_form.default_int.$setPristine(); + scope.survey_question_form.default_textarea.$setPristine(); + scope.survey_question_form.choices.$setPristine(); }; scope.submitQuestion = function(){