Properly clear out prompt data when user manually changes a node's JT

This commit is contained in:
mabashian 2018-07-16 11:11:21 -04:00
parent 53b4a4e2fc
commit f7f1c06d80

View File

@ -433,10 +433,10 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
.then(function() {
$scope.closeDialog();
}).catch(({data, status}) => {
ProcessErrors($scope, data, status, null);
ProcessErrors($scope, data, status, null, {});
});
}).catch(({data, status}) => {
ProcessErrors($scope, data, status, null);
ProcessErrors($scope, data, status, null, {});
});
};
@ -1026,6 +1026,10 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
$scope.templateManuallySelected = function(selectedTemplate) {
if (promptWatcher) {
promptWatcher();
}
if (surveyQuestionWatcher) {
surveyQuestionWatcher();
}
@ -1034,6 +1038,8 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
credentialsWatcher();
}
$scope.promptData = null;
if (selectedTemplate.type === "job_template") {
let jobTemplate = new JobTemplate();