projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-15278 - better handling of wysiwyg editors in popups
[civicrm-core.git]
/
js
/
model
/
crm.uf.js
diff --git
a/js/model/crm.uf.js
b/js/model/crm.uf.js
index 35793341231955259dd6a3af41b55a0205e59969..e72c8383c58aa7efb4e010c571b29955f5adbc2a 100644
(file)
--- a/
js/model/crm.uf.js
+++ b/
js/model/crm.uf.js
@@
-689,6
+689,11
@@
// set proper entity model based on selected profile
var contactTypes = ['Individual', 'Household', 'Organization'];
var profileType = ufGroupModel.get('group_type') || '';
// set proper entity model based on selected profile
var contactTypes = ['Individual', 'Household', 'Organization'];
var profileType = ufGroupModel.get('group_type') || '';
+
+ // check if selected profile have subtype defined eg: ["Individual,Contact,Case", "caseType:7"]
+ if (_.isArray(profileType) && profileType[0]) {
+ profileType = profileType[0];
+ }
profileType = profileType.split(',');
var ufEntityModel;
profileType = profileType.split(',');
var ufEntityModel;
@@
-706,7
+711,7
@@
var newUfEntityModels = [];
_.each(allEntityModels, function (values) {
var newUfEntityModels = [];
_.each(allEntityModels, function (values) {
- if (values.entity_name == 'contact_1') {
+ if (
entityType &&
values.entity_name == 'contact_1') {
values.entity_type = entityType;
}
newUfEntityModels.push(new CRM.UF.UFEntityModel(values));
values.entity_type = entityType;
}
newUfEntityModels.push(new CRM.UF.UFEntityModel(values));