Skip to content

Commit

Permalink
Merge pull request #13785 from demeritcowboy/devcore784
Browse files Browse the repository at this point in the history
dev/core#784 - On civicase case type editing screen creating a new relationship type on the fly inserts a blank row
  • Loading branch information
eileenmcnaughton authored Mar 24, 2019
2 parents 1fd0004 + 03f9a50 commit 08634a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ang/crmCaseType.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,9 @@
} else {
CRM.loadForm(CRM.url('civicrm/admin/reltype', {action: 'add', reset: 1, label_a_b: roleName, label_b_a: roleName}))
.on('crmFormSuccess', function(e, data) {
roles.push({name: data.relationshipType[REL_TYPE_CNAME]});
$scope.relationshipTypeOptions.push({id: data.relationshipType[REL_TYPE_CNAME], text: data.relationshipType.label_b_a});
var newType = _.values(data.relationshipType)[0];
roles.push({name: newType[REL_TYPE_CNAME]});
$scope.relationshipTypeOptions.push({id: newType[REL_TYPE_CNAME], text: newType.label_b_a});
$scope.$digest();
});
}
Expand Down

0 comments on commit 08634a9

Please sign in to comment.