X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2Fmodel%2Fcrm.uf.js;h=d94bc677c7c30c95dd0916418962640d344ff9ac;hb=b0467361b2522bba63bd5a67854ef91226fb638c;hp=ca9fdd255d00bdc7c09c6b117f49773155ff8416;hpb=997a3533bdaf41983a13c27b078f64bca12436fb;p=civicrm-core.git diff --git a/js/model/crm.uf.js b/js/model/crm.uf.js index ca9fdd255d..d94bc677c7 100644 --- a/js/model/crm.uf.js +++ b/js/model/crm.uf.js @@ -87,6 +87,8 @@ return 'membership_1'; case 'Participant': return 'participant_1'; + case 'Case': + return 'case_1'; default: throw "Cannot guess entity name for field_type=" + field_type; } @@ -687,7 +689,11 @@ // set proper entity model based on selected profile var contactTypes = ['Individual', 'Household', 'Organization']; var profileType = ufGroupModel.get('group_type') || ''; + if (profileType[0]) { + profileType = profileType[0]; + } profileType = profileType.split(','); + var ufEntityModel; _.each(profileType, function (ptype) { if ($.inArray(ptype, contactTypes) > -1) {