");if(this.formData.headerRow){o=$("| ").text(e.name);d.append(o)}let i=e.name;this.formData.attributeList&&(i=this.formData.attributeList[t]||null);var s=this.getFieldDropdown(t,i);r.push(s.get(0));o=$(" | ").append(s);d.append(o);let a=e.value||"";200").css("overflow","hidden").text(a);d.append(o);if(~["update","createAndUpdate"].indexOf(this.formData.action)){s=$("").attr("type","checkbox").addClass("form-checkbox").attr("id","update-by-"+t.toString()),s=s.get(0);this.formData.updateBy?~this.formData.updateBy.indexOf(t)&&(s.checked=!0):"id"===e.name&&(s.checked=!0);o=$("| ").append(s);d.append(o)}l.append(d)});e.empty();e.append(t);this.getDefaultFieldList().forEach(e=>{this.addField(e)});this.$addFieldButton=this.$el.find("button.add-field");this.$defaultFieldList=this.$el.find("ul.default-field-list");this.$fieldQuickSearch=this.$el.find("input.add-field-quick-search-input");this.initQuickSearchUi();r.forEach(e=>i.default.init(e))}resetFieldFilterQuickSearch(){this.$fieldQuickSearch.val("");this.$defaultFieldList.find("li.item").removeClass("hidden")}initQuickSearchUi(){this.$addFieldButton.parent().on("show.bs.dropdown",()=>{setTimeout(()=>{this.$fieldQuickSearch.focus();var e=this.$fieldQuickSearch.outerWidth();this.$fieldQuickSearch.css("minWidth",e)},1)});this.$addFieldButton.parent().on("hide.bs.dropdown",()=>{this.resetFieldFilterQuickSearch();this.$fieldQuickSearch.css("minWidth","")})}processFieldFilterQuickSearch(a){a=a.trim();a=a.toLowerCase();let l=this.$defaultFieldList.find("li.item");if(""===a)l.removeClass("hidden");else{l.addClass("hidden");this.fieldList.forEach(e=>{let t=this.fieldTranslations[e]||e;t=t.toLowerCase();var i=t.split(" ");let s=0===t.indexOf(a);s=s||03{var t=this.getFieldManager().getEntityTypeFieldActualAttributeList(this.scope,e);return-1!==t.findIndex(e=>i.includes(e))})}getFieldList(){var e,t=this.getMetadata().get(`entityDefs.${this.scope}.fields`),i=this.getAcl().getScopeForbiddenFieldList(this.scope,"edit");let s=[];for(e in t)if(!i.includes(e)){var a=t[e];!this.allowedFieldList.includes(e)&&(a.disabled||a.importDisabled||a.utility||a.directAccessDisabled&&!a.importEnabled||a.directUpdateDisabled&&!a.importEnabled&&!a.directUpdateEnabled)||s.push(e)}s=s.sort((e,t)=>this.translate(e,"fields",this.scope).localeCompare(this.translate(t,"fields",this.scope)));return s}getAttributeList(){var e=this.getMetadata().get(["entityDefs",this.scope,"fields"])||{},i=this.getAcl().getScopeForbiddenFieldList(this.scope,"edit");let s=[];s.push("id");for(let t in e)if(!i.includes(t)){var a=e[t];if(this.allowedFieldList.includes(t)||!(a.disabled||a.importDisabled||a.utility||a.directAccessDisabled&&!a.importEnabled||a.directUpdateDisabled&&!a.importEnabled&&!a.directUpdateEnabled))if("phone"===a.type){s.push(t);(this.getMetadata().get(`entityDefs.${this.scope}.fields.${t}.typeList`)||[]).map(e=>e.replace(/\s/g,"_")).forEach(e=>{s.push(t+Espo.Utils.upperCaseFirst(e))})}else{if("email"===a.type){s.push(t+"2");s.push(t+"3");s.push(t+"4")}if("link"===a.type){s.push(t+"Name");s.push(t+"Id")}if("foreign"!==a.type||a.relateOnImport){"personName"===a.type&&s.push(t);a=a.type;let e=this.getFieldManager().getActualAttributeList(a,t);e.length||(e=[t]);e.forEach(e=>{-1===s.indexOf(e)&&s.push(e)})}}}s=s.sort((e,t)=>this.translate(e,"fields",this.scope).localeCompare(this.translate(t,"fields",this.scope)));return s}getFieldDropdown(e,s){s=s||!1;var t=this.getAttributeList();let a=$(" | |