mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 00:37:37 -02:30
Job Template Page-new JT w/ no survey
Fixed a defect where the UI would attempt to save a survey spec even if survey_enabled=false
This commit is contained in:
@@ -339,6 +339,7 @@ function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $routePa
|
||||
.success(function(data) {
|
||||
$scope.$emit('templateSaveSuccess', data);
|
||||
|
||||
if(data.survey_enabled===true){
|
||||
//once the job template information is saved we submit the survey info to the correct endpoint
|
||||
var url = data.url+ 'survey_spec/';
|
||||
Rest.setUrl(url);
|
||||
@@ -351,6 +352,8 @@ function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $routePa
|
||||
ProcessErrors($scope, data, status, form, { hdr: 'Error!',
|
||||
msg: 'Failed to add new survey. Post returned status: ' + status });
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
Reference in New Issue
Block a user