projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CRM-16811 - Support markup fields in popup profile editor
[civicrm-core.git]
/
js
/
view
/
crm.designer.js
diff --git
a/js/view/crm.designer.js
b/js/view/crm.designer.js
index 1dc087c6b0b1364665ebeb6cef28266a4a3e607f..0be0f213409a73098de164d06374d7c722da715b 100644
(file)
--- a/
js/view/crm.designer.js
+++ b/
js/view/crm.designer.js
@@
-761,6
+761,9
@@
if (!this.options.fieldSchema.civiIsMultiple) {
fields = _.without(fields, 'is_multi_summary');
}
if (!this.options.fieldSchema.civiIsMultiple) {
fields = _.without(fields, 'is_multi_summary');
}
+ if (this.options.fieldSchema.type == 'Markup') {
+ fields = _.without(fields, 'is_required', 'is_view', 'visibility', 'in_selector', 'is_searchable', 'help_post');
+ }
this.form = new Backbone.Form({
model: this.model,
this.form = new Backbone.Form({
model: this.model,
@@
-785,7
+788,9
@@
if (!this.model.isInSelectorAllowed() && this.model.get('in_selector') != "0") {
this.model.set('in_selector', "0");
if (!this.model.isInSelectorAllowed() && this.model.get('in_selector') != "0") {
this.model.set('in_selector', "0");
- this.form.setValue('in_selector', "0");
+ if (this.form.fields.in_selector) {
+ this.form.setValue('in_selector', "0");
+ }
// TODO: It might be nicer if we didn't completely discard in_selector -- e.g.
// if the value could be restored when the user isInSelectorAllowed becomes true
// again. However, I haven't found a simple way to do this.
// TODO: It might be nicer if we didn't completely discard in_selector -- e.g.
// if the value could be restored when the user isInSelectorAllowed becomes true
// again. However, I haven't found a simple way to do this.