X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=js%2Fmodel%2Fcrm.uf.js;h=be089b1a321ec2820fe6ec15d284aca96455b239;hb=a29e89a5104a7722a48951e16e710dc87f1822d5;hp=392d0a44141cd4e1c44823eb452f8dfd6dae2936;hpb=6bea4a4706bcc7a956ccbcb75b7c9b1fd44816c7;p=civicrm-core.git diff --git a/js/model/crm.uf.js b/js/model/crm.uf.js index 392d0a4414..be089b1a32 100644 --- a/js/model/crm.uf.js +++ b/js/model/crm.uf.js @@ -104,7 +104,12 @@ case 'Case': return 'case_1'; default: - throw "Cannot guess entity name for field_type=" + field_type; + if (!$.isEmptyObject(CRM.contactSubTypes) && ($.inArray(field_type,CRM.contactSubTypes) > -1)) { + return 'contact_1'; + } + else { + throw "Cannot guess entity name for field_type=" + field_type; + } } } @@ -496,7 +501,7 @@ type: 'TextArea' }, 'help_pre': { - title: ts('Pre-form Help '), + title: ts('Pre-form Help'), help: ts('Explanatory text displayed at the beginning of the form.') + ts('Note that this help text is displayed on profile create/edit screens only.'), type: 'TextArea' @@ -525,7 +530,7 @@ options: YESNO }, 'is_proximity_search': { - title: ts('Proximity search'), + title: ts('Proximity Search'), help: ts('FIXME'), type: 'Select', options: YESNO // FIXME @@ -666,8 +671,9 @@ * @return {Boolean} */ //CRM-15427 - checkGroupType: function(validTypesExpr, allowAllSubtypes = false) { + checkGroupType: function(validTypesExpr, allowAllSubtypes) { var allMatched = true; + allowAllSubtypes = allowAllSubtypes || false; if (! this.get('group_type') || this.get('group_type') == '') { return true; }