Skip to content
Snippets Groups Projects
Unverified Commit 2713c2ab authored by totten's avatar totten Committed by GitHub
Browse files

Merge pull request #30818 from eileenmcnaughton/575_i

#5370 Fix bug handling soft credits in civi-import
parents 0bfc70bc c3f37a80
Branches
Tags
No related merge requests found
......@@ -257,6 +257,7 @@
* @type {$scope.save}
*/
$scope.save = (function ($event) {
$event.preventDefault();
$scope.userJob.metadata.entity_configuration = {};
$scope.userJob.metadata.import_mappings = [];
_.each($scope.entitySelection, function (entity) {
......@@ -280,7 +281,16 @@
entity_data: entityConfig
});
});
crmApi4('UserJob', 'save', {records: [$scope.userJob]});
crmApi4('UserJob', 'save', {records: [$scope.userJob]})
.then(function(result) {
// Only post the form if the save succeeds.
document.getElementById("MapField").submit();
},
function(failure) {
// @todo add more error handling - for now, at least we waited...
document.getElementById("MapField").submit();
}
);
});
$scope.load();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment