CRM-16811 - Support markup fields in popup profile editor
[civicrm-core.git] / js / view / crm.designer.js
index 1dc087c6b0b1364665ebeb6cef28266a4a3e607f..0be0f213409a73098de164d06374d7c722da715b 100644 (file)
       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,
 
       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.