Survey Maker

on typeChange of survey question, clear out the values of any downstream components
This commit is contained in:
Jared Tabor 2014-11-26 14:26:07 -05:00
parent 71d0f3af80
commit cfbec378c3
2 changed files with 12 additions and 11 deletions

View File

@ -150,7 +150,7 @@ function($location, Wait, GetBasePath, LookUpInit, JobTemplateForm, CredentialLi
// html+='<br>job_launch_form.$valid = {{job_launch_form.$valid}}<br>';
html+='</form>';
$('#password-modal').empty().html(html);
$('#password-modal').find('textarea').before(scope.helpContainer);
$('#password-modal').find('#job_extra_vars').before(scope.helpContainer);
e = angular.element(document.getElementById('password-modal'));
$compile(e)(scope);

View File

@ -633,16 +633,17 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
};
scope.typeChange = function() {
// alert('typechange');
scope.default = null;
scope.default_multiselect = null;
scope.default_float = null;
scope.default_int = null;
scope.default_textarea = null;
scope.int_min = null;
scope.int_max = null;
scope.float_min = null;
scope.float_max = null;
scope.default = "";
scope.default_multiselect = "";
scope.default_float = "";
scope.default_int = "";
scope.default_textarea = "";
scope.survey_question_form.choices.$setPristine();
scope.choices = "";
scope.int_min = "";
scope.int_max = "";
scope.float_min = "";
scope.float_max = "";
};
scope.submitQuestion = function(){