YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Vtiger/resources/Edit.min.js.map

Summary

Maintainability
Test Coverage
{"version":3,"file":"Edit.min.js","sources":["Edit.js"],"sourcesContent":["/*+***********************************************************************************\n * The contents of this file are subject to the vtiger CRM Public License Version 1.0\n * (\"License\"); You may not use this file except in compliance with the License\n * The Original Code is:  vtiger CRM Open Source\n * The Initial Developer of the Original Code is vtiger.\n * Portions created by vtiger are Copyright (C) vtiger.\n * All Rights Reserved.\n * Contributor(s): YetiForce S.A.\n *************************************************************************************/\n'use strict';\n\n$.Class(\n\t'Vtiger_Edit_Js',\n\t{\n\t\t//Event that will triggered when reference field is selected\n\t\treferenceSelectionEvent: 'Vtiger.Reference.Selection',\n\t\t//Event that will triggered when reference field is selected\n\t\treferenceDeSelectionEvent: 'Vtiger.Reference.DeSelection',\n\t\t//Event that will triggered before saving the record\n\t\trecordPreSave: 'Vtiger.Record.PreSave',\n\t\teditInstance: false,\n\t\tinventoryController: false,\n\t\t/**\n\t\t * Function to get Instance by name\n\t\t * @params moduleName:-- Name of the module to create instance\n\t\t */\n\t\tgetInstanceByModuleName: function (moduleName) {\n\t\t\tif (typeof moduleName === 'undefined') {\n\t\t\t\tmoduleName = app.getModuleName();\n\t\t\t}\n\t\t\tlet parentModule = app.getParentModuleName(),\n\t\t\t\tmoduleClassName,\n\t\t\t\tfallbackClassName,\n\t\t\t\tinstance;\n\t\t\tif (parentModule === 'Settings') {\n\t\t\t\tmoduleClassName = parentModule + '_' + moduleName + '_Edit_Js';\n\t\t\t\tif (typeof window[moduleClassName] === 'undefined') {\n\t\t\t\t\tmoduleClassName = moduleName + '_Edit_Js';\n\t\t\t\t}\n\t\t\t\tfallbackClassName = parentModule + '_Vtiger_Edit_Js';\n\t\t\t\tif (typeof window[fallbackClassName] === 'undefined') {\n\t\t\t\t\tfallbackClassName = 'Vtiger_Edit_Js';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tmoduleClassName = moduleName + '_Edit_Js';\n\t\t\t\tfallbackClassName = 'Vtiger_Edit_Js';\n\t\t\t}\n\t\t\tif (typeof window[moduleClassName] !== 'undefined') {\n\t\t\t\tinstance = new window[moduleClassName]();\n\t\t\t} else {\n\t\t\t\tinstance = new window[fallbackClassName]();\n\t\t\t}\n\t\t\tinstance.moduleName = moduleName;\n\t\t\treturn instance;\n\t\t},\n\t\tgetInstance: function () {\n\t\t\tif (Vtiger_Edit_Js.editInstance == false) {\n\t\t\t\tlet instance = Vtiger_Edit_Js.getInstanceByModuleName();\n\t\t\t\tVtiger_Edit_Js.editInstance = instance;\n\t\t\t\treturn instance;\n\t\t\t}\n\t\t\treturn Vtiger_Edit_Js.editInstance;\n\t\t},\n\t\t/**\n\t\t * Record save ajax\n\t\t *\n\t\t * `Vtiger_Edit_Js.saveAjax({\n\t\t *\t\tvalue: 'value',\n\t\t *\t\tfield: 'field'\n\t\t *\t}).done(() => {})\n\t\t *\t.fail((error, err) => {});`\n\t\t *\n\t\t * @param {object} params\n\t\t * @returns {Promise}\n\t\t */\n\t\tsaveAjax: function (params, progressIndicator = false) {\n\t\t\tconst aDeferred = $.Deferred();\n\t\t\tif (typeof params === 'undefined' || $.isEmptyObject(params)) {\n\t\t\t\taDeferred.reject();\n\t\t\t\treturn aDeferred.promise();\n\t\t\t}\n\t\t\tif (!params['record'] && app.getRecordId()) {\n\t\t\t\tparams['record'] = app.getRecordId();\n\t\t\t}\n\t\t\tif (!params['module']) {\n\t\t\t\tparams['module'] = app.getModuleName();\n\t\t\t}\n\t\t\tparams['action'] = 'SaveAjax';\n\t\t\tparams = {\n\t\t\t\tdata: params,\n\t\t\t\tasync: false,\n\t\t\t\tdataType: 'json'\n\t\t\t};\n\t\t\tif (progressIndicator) {\n\t\t\t\tdocument.progressLoader = $.progressIndicator({\n\t\t\t\t\tmessage: app.vtranslate('JS_SAVE_LOADER_INFO'),\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.saveAjaxValidation(params).then((response) => {\n\t\t\t\tif (response === true) {\n\t\t\t\t\tdelete params.data.mode;\n\t\t\t\t\tAppConnector.request(params)\n\t\t\t\t\t\t.done(function (responseData) {\n\t\t\t\t\t\t\taDeferred.resolve(responseData);\n\t\t\t\t\t\t\tif (progressIndicator) {\n\t\t\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail((jqXHR, textStatus, errorThrown) => {\n\t\t\t\t\t\t\taDeferred.reject(jqXHR, textStatus, errorThrown);\n\t\t\t\t\t\t\tif (progressIndicator) {\n\t\t\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\taDeferred.resolve({ success: false });\n\t\t\t\t\tif (progressIndicator) {\n\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Record pre save validation\n\t\t * @param {object} params\n\t\t * @returns {Promise}\n\t\t */\n\t\tsaveAjaxValidation: function (params) {\n\t\t\tconst aDeferred = $.Deferred();\n\t\t\tif (this.getInstance().checkPreSaveValidation()) {\n\t\t\t\tlet paramsTemp = JSON.parse(JSON.stringify(params));\n\t\t\t\tparamsTemp.data.mode = 'preSaveValidation';\n\t\t\t\tAppConnector.request(paramsTemp)\n\t\t\t\t\t.done((data) => {\n\t\t\t\t\t\tconst response = data.result;\n\t\t\t\t\t\tlet lock = false;\n\t\t\t\t\t\tfor (let i in response) {\n\t\t\t\t\t\t\tif (response[i].result !== true) {\n\t\t\t\t\t\t\t\tif (response[i].type === 'confirm' && typeof response[i].hash !== 'undefined') {\n\t\t\t\t\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\t\t\t\t\ttext: response[i].message || '',\n\t\t\t\t\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\t\t\t\t\tlet handlers = {};\n\t\t\t\t\t\t\t\t\t\t\tif (typeof params.data.skipHandlers !== 'undefined') {\n\t\t\t\t\t\t\t\t\t\t\t\thandlers = JSON.parse(params.data.skipHandlers);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thandlers[i] = response[i].hash;\n\t\t\t\t\t\t\t\t\t\t\tparams.data.skipHandlers = JSON.stringify(handlers);\n\t\t\t\t\t\t\t\t\t\t\tthis.saveAjaxValidation(params, form).then((responsePart) => {\n\t\t\t\t\t\t\t\t\t\t\t\taDeferred.resolve(responsePart);\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\trejectedCallback: () => {\n\t\t\t\t\t\t\t\t\t\t\taDeferred.resolve(false);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tlock = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\ttypeof response[i].showModal !== 'undefined' &&\n\t\t\t\t\t\t\t\t\ttypeof response[i].showModal.url !== 'undefined'\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tapp.showModalWindow(null, response[i].showModal.url, function (modalContainer) {\n\t\t\t\t\t\t\t\t\t\tapp.registerModalController(undefined, modalContainer, function (_, instance) {\n\t\t\t\t\t\t\t\t\t\t\tinstance.formContainer = form;\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttext: response[i].message ? response[i].message : app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (data.result.length <= 0) {\n\t\t\t\t\t\t\taDeferred.resolve(true);\n\t\t\t\t\t\t} else if (!lock) {\n\t\t\t\t\t\t\taDeferred.resolve(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.fail((textStatus, errorThrown) => {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t});\n\t\t\t\t\t\taDeferred.resolve(false);\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\taDeferred.resolve(true);\n\t\t\t}\n\t\t\treturn aDeferred.promise();\n\t\t}\n\t},\n\t{\n\t\tformElement: false,\n\t\trelationOperation: '',\n\t\tmoduleName: app.getModuleName(),\n\t\tgetForm: function () {\n\t\t\tif (this.formElement == false) {\n\t\t\t\tthis.setForm($('#EditView'));\n\t\t\t}\n\t\t\treturn this.formElement;\n\t\t},\n\t\tsetForm: function (element) {\n\t\t\tthis.formElement = element;\n\t\t\tlet module;\n\t\t\tif ((module = $('input[name=\"module\"]', element))) {\n\t\t\t\tthis.moduleName = module.val();\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\t\tgetRecordsListParams: function (container) {\n\t\t\tlet formElement = container.closest('form');\n\t\t\tlet sourceModule = $('input[name=\"module\"]', formElement).val();\n\t\t\tlet popupReferenceModule = $('input[name=\"popupReferenceModule\"]', container).val();\n\t\t\tlet sourceFieldElement = $('input[class=\"sourceField\"]', container);\n\t\t\tlet sourceField = sourceFieldElement.attr('name');\n\t\t\tlet sourceRecordElement = $('input[name=\"record\"]', formElement);\n\t\t\tlet sourceRecordId = '';\n\t\t\tif (sourceRecordElement.length > 0) {\n\t\t\t\tsourceRecordId = sourceRecordElement.val();\n\t\t\t}\n\t\t\tlet isMultiple = false;\n\t\t\tif (sourceFieldElement.data('multiple') == true) {\n\t\t\t\tisMultiple = true;\n\t\t\t}\n\t\t\tlet filterFields = {};\n\t\t\tlet mappingRelatedField = formElement.find('input[name=\"mappingRelatedField\"]').val();\n\t\t\tlet mappingRelatedModule = mappingRelatedField ? JSON.parse(mappingRelatedField) : [];\n\t\t\tif (\n\t\t\t\tmappingRelatedModule[sourceField] != undefined &&\n\t\t\t\tmappingRelatedModule[sourceField][popupReferenceModule] != undefined\n\t\t\t) {\n\t\t\t\t$.each(mappingRelatedModule[sourceField][popupReferenceModule], function (index, value) {\n\t\t\t\t\tlet mapFieldElement = formElement.find('[name=\"' + index + '\"]');\n\t\t\t\t\tif (mapFieldElement.length && mapFieldElement.val() != '') {\n\t\t\t\t\t\tfilterFields[index] = mapFieldElement.val();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tlet listFilterFieldsJson = formElement.find('input[name=\"listFilterFields\"]').val();\n\t\t\tlet listFilterFields = listFilterFieldsJson ? JSON.parse(listFilterFieldsJson) : [];\n\t\t\tif (\n\t\t\t\tlistFilterFields[sourceField] != undefined &&\n\t\t\t\tlistFilterFields[sourceField][popupReferenceModule] != undefined\n\t\t\t) {\n\t\t\t\t$.each(listFilterFields[sourceField][popupReferenceModule], function (index, value) {\n\t\t\t\t\tlet mapFieldElement = formElement.find('[name=\"' + index + '\"]');\n\t\t\t\t\tif (mapFieldElement.length && mapFieldElement.val() != '') {\n\t\t\t\t\t\tfilterFields[index] = mapFieldElement.val();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tlet params = {\n\t\t\t\tmodule: popupReferenceModule,\n\t\t\t\tsrc_module: sourceModule,\n\t\t\t\tsrc_field: sourceField,\n\t\t\t\tsrc_record: sourceRecordId,\n\t\t\t\tfilterFields: filterFields\n\t\t\t};\n\t\t\tlet searchParamsElement = $('input[name=\"searchParams\"]', container);\n\t\t\tlet searchParams = searchParamsElement.length > 0 ? JSON.parse(searchParamsElement.val()) : null;\n\t\t\tif (searchParams && searchParams[popupReferenceModule]) {\n\t\t\t\tparams['search_params'] = searchParams[popupReferenceModule];\n\t\t\t}\n\t\t\tlet modalParamsElement = $('input[name=\"modalParams\"]', container);\n\t\t\tif (modalParamsElement.length > 0) {\n\t\t\t\tparams['modal_params'] = modalParamsElement.val();\n\t\t\t}\n\t\t\tlet lockedFieldsElement = $('input[name=\"lockedFields\"]', container);\n\t\t\tif (lockedFieldsElement.length > 0) {\n\t\t\t\tparams['lockedFields'] = lockedFieldsElement.val();\n\t\t\t}\n\t\t\t$.each(['link', 'process'], function (index, value) {\n\t\t\t\tlet fieldElement = formElement.find('[name=\"' + value + '\"]');\n\t\t\t\tif (fieldElement.length && fieldElement.val() != '' && fieldElement.val() != 0) {\n\t\t\t\t\tparams[value] = fieldElement.val();\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (isMultiple) {\n\t\t\t\tparams.multi_select = true;\n\t\t\t}\n\t\t\treturn params;\n\t\t},\n\t\t/**\n\t\t * Show records list modal\n\t\t * @param {jQuery.Event} e\n\t\t */\n\t\tshowRecordsList: function (e) {\n\t\t\tlet parentElem = $(e.target).closest('.fieldValue');\n\t\t\tif (parentElem.length <= 0) {\n\t\t\t\tparentElem = $(e.target).closest('td');\n\t\t\t}\n\t\t\tlet params = this.getRecordsListParams(parentElem);\n\t\t\tapp.showRecordsList(params, (_modal, instance) => {\n\t\t\t\tinstance.setSelectEvent((data) => {\n\t\t\t\t\tthis.setReferenceFieldValue(parentElem, data);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tsetReferenceFieldValue: function (container, params) {\n\t\t\tconst thisInstance = this;\n\t\t\tlet sourceFieldElement = container.find('input.sourceField');\n\t\t\tlet sourceField = sourceFieldElement.attr('name');\n\t\t\tlet fieldElement = container.find('input[name=\"' + sourceField + '\"]');\n\t\t\tlet sourceFieldDisplay = sourceField + '_display';\n\t\t\tlet fieldDisplayElement = container.find('input[name=\"' + sourceFieldDisplay + '\"]');\n\t\t\tlet popupReferenceModule = container.find('input[name=\"popupReferenceModule\"]').val();\n\t\t\tlet selectedName = params.name;\n\t\t\tlet id = params.id;\n\n\t\t\tcontainer.find('.clearReferenceSelection').trigger('click');\n\n\t\t\tfieldElement.val(id);\n\t\t\tfieldDisplayElement.val(app.decodeHTML(selectedName)).attr('readonly', true);\n\t\t\tfieldElement.trigger(Vtiger_Edit_Js.referenceSelectionEvent, {\n\t\t\t\tmodule: popupReferenceModule,\n\t\t\t\trecord: id,\n\t\t\t\tselectedName: selectedName\n\t\t\t});\n\t\t\tfieldDisplayElement.validationEngine('closePrompt', fieldDisplayElement);\n\t\t\tif (sourceFieldElement.data('type') == 'inventory') {\n\t\t\t\treturn params;\n\t\t\t}\n\t\t\tlet formElement = container.closest('form');\n\t\t\tlet mappingRelatedField = this.getMappingRelatedField(sourceField, popupReferenceModule, formElement);\n\t\t\tif (typeof mappingRelatedField !== 'undefined') {\n\t\t\t\tlet params = {\n\t\t\t\t\tmodule: popupReferenceModule,\n\t\t\t\t\trecord: id\n\t\t\t\t};\n\t\t\t\tapp.getRecordDetails(params).done(function (data) {\n\t\t\t\t\tlet response = (params.data = data['result']['data']);\n\t\t\t\t\tapp.event.trigger('EditView.SelectReference', params, formElement, data);\n\t\t\t\t\t$.each(mappingRelatedField, function (key, value) {\n\t\t\t\t\t\tif (response[value[0]] != 0) {\n\t\t\t\t\t\t\tlet mapFieldElement = formElement.find('[name=\"' + key + '\"]');\n\t\t\t\t\t\t\tlet fieldinfo = mapFieldElement.data('fieldinfo');\n\t\t\t\t\t\t\tif (data['result']['type'][value[0]] === 'date' || data['result']['type'][value[0]] === 'datetime') {\n\t\t\t\t\t\t\t\tmapFieldElement.val(data['result']['displayData'][value[0]]);\n\t\t\t\t\t\t\t} else if (data['result']['type'][value[0]] === 'multipicklist') {\n\t\t\t\t\t\t\t\tlet mapFieldElementMultiselect = formElement.find('[name=\"' + key + '[]\"]');\n\t\t\t\t\t\t\t\tif (mapFieldElementMultiselect.length > 0) {\n\t\t\t\t\t\t\t\t\tlet multipleAttr = mapFieldElementMultiselect.attr('multiple');\n\t\t\t\t\t\t\t\t\tlet splitValues = response[value[0]].split(' |##| ');\n\t\t\t\t\t\t\t\t\tif (typeof multipleAttr !== 'undefined' && multipleAttr !== false && splitValues.length > 0) {\n\t\t\t\t\t\t\t\t\t\tmapFieldElementMultiselect.val(splitValues).trigger('change');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (mapFieldElement.is('select')) {\n\t\t\t\t\t\t\t\tif (mapFieldElement.find('option[value=\"' + response[value[0]] + '\"]').length) {\n\t\t\t\t\t\t\t\t\tmapFieldElement.val(response[value[0]]).trigger('change');\n\t\t\t\t\t\t\t\t} else if (mapFieldElement.data('fieldinfo').picklistvalues.hasOwnProperty(response[value[0]])) {\n\t\t\t\t\t\t\t\t\tlet newOption = new Option(response[value[0]], response[value[0]], true, true);\n\t\t\t\t\t\t\t\t\tmapFieldElement.append(newOption).trigger('change');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (mapFieldElement.length == 0) {\n\t\t\t\t\t\t\t\t$(\"<input type='hidden'/>\").attr('name', key).attr('value', response[value[0]]).appendTo(formElement);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmapFieldElement.val(response[value[0]]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlet mapFieldDisplayElement = formElement.find('input[name=\"' + key + '_display\"]');\n\t\t\t\t\t\t\tif (mapFieldDisplayElement.length > 0) {\n\t\t\t\t\t\t\t\tmapFieldDisplayElement.val(data['result']['displayData'][value[0]]).attr('readonly', true);\n\t\t\t\t\t\t\t\tif (fieldinfo.type === 'reference') {\n\t\t\t\t\t\t\t\t\tlet referenceModulesList = mapFieldElement.closest('.fieldValue').find('.referenceModulesList');\n\t\t\t\t\t\t\t\t\tif (referenceModulesList.length > 0 && value[1]) {\n\t\t\t\t\t\t\t\t\t\treferenceModulesList.val(value[1]).trigger('change');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tthisInstance.setReferenceFieldValue(mapFieldDisplayElement.closest('.fieldValue'), {\n\t\t\t\t\t\t\t\t\t\tname: data['result']['displayData'][value[0]],\n\t\t\t\t\t\t\t\t\t\tid: response[value[0]]\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tgetRelationOperation: function () {\n\t\t\tif (this.relationOperation === '') {\n\t\t\t\tlet relationOperation = $('[name=\"relationOperation\"]');\n\t\t\t\tif (relationOperation.length) {\n\t\t\t\t\tthis.relationOperation = relationOperation.val();\n\t\t\t\t} else {\n\t\t\t\t\tthis.relationOperation = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.relationOperation;\n\t\t},\n\t\tproceedRegisterEvents: function () {\n\t\t\treturn $('.recordEditView').length > 0;\n\t\t},\n\t\treferenceModulePopupRegisterEvent: function (container) {\n\t\t\tcontainer.on('click', '.relatedPopup', (e) => {\n\t\t\t\tthis.showRecordsList(e);\n\t\t\t});\n\t\t\tlet moduleList = container.find('.referenceModulesList');\n\t\t\tApp.Fields.Picklist.showSelect2ElementView(container.find('.referenceModulesList:visible'));\n\t\t\tmoduleList.on('change', (e) => {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tlet parentElem = element.closest('.fieldValue');\n\t\t\t\tlet popupReferenceModule = element.val();\n\t\t\t\tlet referenceModuleElement = $('input[name=\"popupReferenceModule\"]', parentElem);\n\t\t\t\tlet prevSelectedReferenceModule = referenceModuleElement.val();\n\t\t\t\treferenceModuleElement.val(popupReferenceModule);\n\t\t\t\t//If Reference module is changed then we should clear the previous value\n\t\t\t\tif (prevSelectedReferenceModule != popupReferenceModule) {\n\t\t\t\t\tparentElem.find('.clearReferenceSelection').trigger('click');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tgetReferencedModuleName: function (parenElement) {\n\t\t\treturn $('input[name=\"popupReferenceModule\"]', parenElement).val();\n\t\t},\n\t\tsearchModuleNames: function (params) {\n\t\t\tlet aDeferred = $.Deferred();\n\t\t\tif (typeof params.module === 'undefined') {\n\t\t\t\tparams.module = this.moduleName;\n\t\t\t}\n\t\t\tif (typeof params.action === 'undefined') {\n\t\t\t\tparams.action = 'BasicAjax';\n\t\t\t}\n\t\t\tAppConnector.request(params)\n\t\t\t\t.done(function (data) {\n\t\t\t\t\taDeferred.resolve(data);\n\t\t\t\t})\n\t\t\t\t.fail(function (error) {\n\t\t\t\t\taDeferred.reject();\n\t\t\t\t});\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\t/**\n\t\t * Function to get reference search params\n\t\t */\n\t\tgetReferenceSearchParams: function (element) {\n\t\t\tlet tdElement = $(element).closest('.fieldValue');\n\t\t\tlet params = {};\n\t\t\tlet searchModule = this.getReferencedModuleName(tdElement);\n\t\t\tparams.search_module = searchModule;\n\t\t\treturn params;\n\t\t},\n\t\t/**\n\t\t * Function which will handle the reference auto complete event registrations\n\t\t * @params - container <jQuery> - element in which auto complete fields needs to be searched\n\t\t */\n\t\tregisterAutoCompleteFields: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tlet formElement = container.closest('form');\n\t\t\tcontainer.find('input.autoComplete').autocomplete({\n\t\t\t\tdelay: '600',\n\t\t\t\tminLength: '3',\n\t\t\t\tsource: function (request, response) {\n\t\t\t\t\t//element will be array of dom elements\n\t\t\t\t\t//here this refers to auto complete instance\n\t\t\t\t\tlet inputElement = $(this.element[0]);\n\t\t\t\t\tlet searchValue = request.term;\n\t\t\t\t\tlet params = thisInstance.getReferenceSearchParams(inputElement);\n\t\t\t\t\tparams.search_value = searchValue;\n\t\t\t\t\tlet sourceRecordElement = $('input[name=\"record\"]', formElement);\n\t\t\t\t\tif (sourceRecordElement.length > 0 && sourceRecordElement.val()) {\n\t\t\t\t\t\tparams.src_record = sourceRecordElement.val();\n\t\t\t\t\t}\n\t\t\t\t\tthisInstance.searchModuleNames(params).done(function (data) {\n\t\t\t\t\t\tlet reponseDataList = [];\n\t\t\t\t\t\tlet serverDataFormat = data.result;\n\t\t\t\t\t\tif (serverDataFormat.length <= 0) {\n\t\t\t\t\t\t\t$(inputElement).val('');\n\t\t\t\t\t\t\tserverDataFormat = new Array({\n\t\t\t\t\t\t\t\tlabel: app.vtranslate('JS_NO_RESULTS_FOUND'),\n\t\t\t\t\t\t\t\ttype: 'no results'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (let id in serverDataFormat) {\n\t\t\t\t\t\t\tlet responseData = serverDataFormat[id];\n\t\t\t\t\t\t\treponseDataList.push(responseData);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresponse(reponseDataList);\n\t\t\t\t\t\tapp.event.trigger('EditView.AfterSearch', {\n\t\t\t\t\t\t\tfield: inputElement,\n\t\t\t\t\t\t\tparams: params\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tselect: function (event, ui) {\n\t\t\t\t\tlet selectedItemData = ui.item;\n\t\t\t\t\t//To stop selection if no results is selected\n\t\t\t\t\tif (typeof selectedItemData.type !== 'undefined' && selectedItemData.type == 'no results') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tselectedItemData.name = selectedItemData.value;\n\t\t\t\t\tlet element = $(this);\n\t\t\t\t\tlet tdElement = element.closest('.fieldValue');\n\t\t\t\t\tthisInstance.setReferenceFieldValue(tdElement, selectedItemData);\n\t\t\t\t},\n\t\t\t\tchange: function (event, ui) {\n\t\t\t\t\tlet element = $(this);\n\t\t\t\t\t//if you dont have readonly attribute means the user didnt select the item\n\t\t\t\t\tif (element.attr('readonly') == undefined) {\n\t\t\t\t\t\telement.closest('.fieldValue').find('.clearReferenceSelection').trigger('click');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\topen: function (event, ui) {\n\t\t\t\t\t//To Make the menu come up in the case of quick create\n\t\t\t\t\t$(this).data('ui-autocomplete').menu.element.css('z-index', '100001');\n\t\t\t\t},\n\t\t\t\tposition: { collision: 'flipfit' }\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will register reference field clear event\n\t\t * @params - container <jQuery> - element in which auto complete fields needs to be searched\n\t\t */\n\t\tregisterClearReferenceSelectionEvent: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tcontainer.on('click', '.clearReferenceSelection', function (e) {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tthisInstance.clearFieldValue(element);\n\t\t\t\telement.closest('.fieldValue').find('.sourceField').trigger(Vtiger_Edit_Js.referenceDeSelectionEvent);\n\t\t\t\te.preventDefault();\n\t\t\t});\n\t\t},\n\t\tclearFieldValue: function (element) {\n\t\t\tconst self = this;\n\t\t\tlet fieldValueContener = element.closest('.fieldValue');\n\t\t\tlet fieldNameElement = fieldValueContener.find('.sourceField');\n\t\t\tlet fieldName = fieldNameElement.attr('name');\n\t\t\tlet referenceModule = fieldValueContener.find('input[name=\"popupReferenceModule\"]').val();\n\t\t\tlet formElement = fieldValueContener.closest('form');\n\t\t\tif (fieldNameElement.data('fieldtype') == 'reference') {\n\t\t\t\tfieldNameElement.val(0);\n\t\t\t} else {\n\t\t\t\tfieldNameElement.val('');\n\t\t\t}\n\t\t\tfieldValueContener\n\t\t\t\t.find('#' + fieldName + '_display')\n\t\t\t\t.removeAttr('readonly')\n\t\t\t\t.val('');\n\t\t\tapp.event.trigger('EditView.ClearField', {\n\t\t\t\tfieldName: fieldName,\n\t\t\t\treferenceModule: referenceModule\n\t\t\t});\n\t\t\tlet mappingRelatedField = this.getMappingRelatedField(fieldName, referenceModule, formElement);\n\t\t\t$.each(mappingRelatedField, function (key, value) {\n\t\t\t\tlet mapFieldElement = formElement.find('[name=\"' + key + '\"]');\n\t\t\t\tif (mapFieldElement.is('select')) {\n\t\t\t\t\tmapFieldElement.val(mapFieldElement.find('option:first').val()).trigger('change');\n\t\t\t\t} else {\n\t\t\t\t\tmapFieldElement.val('');\n\t\t\t\t}\n\t\t\t\tlet mapFieldDisplayElement = formElement.find('input[name=\"' + key + '_display\"]');\n\t\t\t\tif (mapFieldDisplayElement.length > 0) {\n\t\t\t\t\tmapFieldDisplayElement.val('').attr('readonly', false);\n\t\t\t\t\tlet referenceModulesList = formElement.find(\n\t\t\t\t\t\t'#' + self.moduleName + '_editView_fieldName_' + key + '_dropDown'\n\t\t\t\t\t);\n\t\t\t\t\tif (referenceModulesList.length > 0 && value[1]) {\n\t\t\t\t\t\treferenceModulesList.val(referenceModulesList.find('option:first').val()).trigger('change');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will register event to prevent form submission on pressing on enter\n\t\t * @params - container <jQuery> - element in which auto complete fields needs to be searched\n\t\t */\n\t\tregisterPreventingEnterSubmitEvent: function (container) {\n\t\t\tcontainer.on('keypress', function (e) {\n\t\t\t\t//Stop the submit when enter is pressed in the form\n\t\t\t\tlet currentElement = $(e.target);\n\t\t\t\tif (e.which == 13 && !currentElement.is('textarea')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tregisterTimeFields: function (container) {\n\t\t\tapp.registerEventForClockPicker();\n\t\t\tApp.Fields.Date.register(container);\n\t\t\tApp.Fields.DateTime.register(container);\n\t\t},\n\t\treferenceCreateHandler: function (container) {\n\t\t\tlet formData = this.getForm().serializeFormData();\n\t\t\tfor (let i in formData) {\n\t\t\t\tif (!formData[i] || $.inArray(i, ['_csrf', 'action']) != -1) {\n\t\t\t\t\tdelete formData[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tApp.Components.QuickCreate.createRecord(this.getReferencedModuleName(container), {\n\t\t\t\tdata: {\n\t\t\t\t\tsourceModule: formData['module'],\n\t\t\t\t\tsourceRecordData: formData\n\t\t\t\t},\n\t\t\t\tcallbackFunction: (data) => {\n\t\t\t\t\tthis.setReferenceFieldValue(container, {\n\t\t\t\t\t\tname: data.result._recordLabel,\n\t\t\t\t\t\tid: data.result._recordId\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tnoCache: true\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will register event for create of reference record\n\t\t * This will allow users to create reference record from edit view of other record\n\t\t */\n\t\tregisterReferenceCreate: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tcontainer.on('click', '.createReferenceRecord', function (e) {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tlet controlElementDiv = element.closest('.fieldValue');\n\t\t\t\tthisInstance.referenceCreateHandler(controlElementDiv);\n\t\t\t});\n\t\t},\n\t\taddressFieldsMapping: [\n\t\t\t'buildingnumber',\n\t\t\t'localnumber',\n\t\t\t'addresslevel1',\n\t\t\t'addresslevel2',\n\t\t\t'addresslevel3',\n\t\t\t'addresslevel4',\n\t\t\t'addresslevel5',\n\t\t\t'addresslevel6',\n\t\t\t'addresslevel7',\n\t\t\t'addresslevel8',\n\t\t\t'pobox'\n\t\t],\n\t\taddressFieldsMappingBlockID: {\n\t\t\tLBL_ADDRESS_INFORMATION: 'a',\n\t\t\tLBL_ADDRESS_BILLING: 'a',\n\t\t\tLBL_ADDRESS_MAILING_INFORMATION: 'b',\n\t\t\tLBL_ADDRESS_SHIPPING: 'b',\n\t\t\tLBL_ADDRESS_DELIVERY_INFORMATION: 'c'\n\t\t},\n\t\taddressFieldsData: false,\n\t\t/**\n\t\t * Function to register event for copying addresses\n\t\t */\n\t\tregisterEventForCopyAddress: function () {\n\t\t\tlet thisInstance = this;\n\t\t\tthis.formElement\n\t\t\t\t.find(\n\t\t\t\t\t'.js-toggle-panel:not(.inventoryHeader):not(.inventoryItems) .fieldValue, .js-toggle-panel:not(.inventoryHeader):not(.inventoryItems) .fieldLabel'\n\t\t\t\t)\n\t\t\t\t.each(function () {\n\t\t\t\t\tlet block = $(this);\n\t\t\t\t\tlet referenceModulesList = block.find('.referenceModulesList');\n\t\t\t\t\tif (referenceModulesList.length > 0) {\n\t\t\t\t\t\treferenceModulesList.on('change', function () {\n\t\t\t\t\t\t\tthisInstance.formElement\n\t\t\t\t\t\t\t\t.find('[class*=\"copyAddressFrom\"]:not(.copyAddressFromMain, .copyAddressFromMailing)')\n\t\t\t\t\t\t\t\t.addClass('d-none');\n\t\t\t\t\t\t\tthisInstance.registerEventForCopyBlockAddress($(this).val(), block.find('.sourceField').attr('name'));\n\t\t\t\t\t\t});\n\t\t\t\t\t\treferenceModulesList.trigger('change');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet referenceFields = block.find('[name=\"popupReferenceModule\"]');\n\t\t\t\t\t\tif (referenceFields.length > 0) {\n\t\t\t\t\t\t\tthisInstance.registerEventForCopyBlockAddress(\n\t\t\t\t\t\t\t\treferenceFields.val(),\n\t\t\t\t\t\t\t\tblock.find('.sourceField').attr('name')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tthis.formElement.find('.js-toggle-panel').each(function () {\n\t\t\t\tlet hideCopyAddressLabel = true;\n\t\t\t\t$(this)\n\t\t\t\t\t.find('.adressAction button')\n\t\t\t\t\t.each(function () {\n\t\t\t\t\t\tif ($(this).hasClass('d-none') == false) {\n\t\t\t\t\t\t\thideCopyAddressLabel = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\tif (hideCopyAddressLabel) {\n\t\t\t\t\t$(this).find('.copyAddressLabel').addClass('d-none');\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.formElement.find('.copyAddressFromMain').on('click', function (e) {\n\t\t\t\tlet element = $(this);\n\t\t\t\tlet block = element.closest('.js-toggle-panel');\n\t\t\t\tlet from = element.data('label');\n\t\t\t\tlet to = block.data('label');\n\t\t\t\tthisInstance.copyAddress(from, to, false, false);\n\t\t\t});\n\t\t\tthis.formElement.find('.copyAddressFromMailing').on('click', function (e) {\n\t\t\t\tlet element = $(this);\n\t\t\t\tlet block = element.closest('.js-toggle-panel');\n\t\t\t\tlet from = element.data('label');\n\t\t\t\tlet to = block.data('label');\n\t\t\t\tthisInstance.copyAddress(from, to, false, false);\n\t\t\t});\n\t\t\tthis.formElement.find('.copyAddressFromDelivery').on('click', function (e) {\n\t\t\t\tlet element = $(this);\n\t\t\t\tlet block = element.closest('.js-toggle-panel');\n\t\t\t\tlet from = element.data('label');\n\t\t\t\tlet to = block.data('label');\n\t\t\t\tthisInstance.copyAddress(from, to, false, false);\n\t\t\t});\n\t\t},\n\t\tregisterEventForCopyBlockAddress: function (moduleName, fieldName) {\n\t\t\tconst self = this;\n\t\t\tif (moduleName == 'Accounts') {\n\t\t\t\tself.enableCopyAddressFromModule(\n\t\t\t\t\tmoduleName,\n\t\t\t\t\tself.formElement,\n\t\t\t\t\t'copyAddressFromAccount',\n\t\t\t\t\tfieldName,\n\t\t\t\t\t'JS_PLEASE_SELECT_AN_ACCOUNT_TO_COPY_ADDRESS'\n\t\t\t\t);\n\t\t\t} else if (moduleName == 'Contacts') {\n\t\t\t\tself.enableCopyAddressFromModule(\n\t\t\t\t\tmoduleName,\n\t\t\t\t\tself.formElement,\n\t\t\t\t\t'copyAddressFromContact',\n\t\t\t\t\tfieldName,\n\t\t\t\t\t'JS_PLEASE_SELECT_AN_CONTACT_TO_COPY_ADDRESS'\n\t\t\t\t);\n\t\t\t} else if (moduleName == 'Leads') {\n\t\t\t\tself.enableCopyAddressFromModule(\n\t\t\t\t\tmoduleName,\n\t\t\t\t\tself.formElement,\n\t\t\t\t\t'copyAddressFromLead',\n\t\t\t\t\tfieldName,\n\t\t\t\t\t'JS_PLEASE_SELECT_AN_LEAD_TO_COPY_ADDRESS'\n\t\t\t\t);\n\t\t\t} else if (moduleName == 'Vendors') {\n\t\t\t\tself.enableCopyAddressFromModule(\n\t\t\t\t\tmoduleName,\n\t\t\t\t\tself.formElement,\n\t\t\t\t\t'copyAddressFromVendor',\n\t\t\t\t\tfieldName,\n\t\t\t\t\t'JS_PLEASE_SELECT_AN_VENDOR_TO_COPY_ADDRESS'\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Show button to copy the address details from selected module\n\t\t */\n\t\tenableCopyAddressFromModule: function (moduleName, formElement, className, fieldName, label) {\n\t\t\tlet thisInstance = this;\n\t\t\tformElement\n\t\t\t\t.find('.' + className)\n\t\t\t\t.removeClass('d-none')\n\t\t\t\t.on('click', function (e) {\n\t\t\t\t\tlet element = $(this);\n\t\t\t\t\tlet recordRelativeAccountId = $('[name=\"' + fieldName + '\"]').val();\n\t\t\t\t\tif (recordRelativeAccountId == '' || recordRelativeAccountId == '0') {\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate(label),\n\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlet recordRelativeAccountName = $('#' + fieldName + '_display').val();\n\t\t\t\t\t\tlet data = {\n\t\t\t\t\t\t\trecord: recordRelativeAccountId,\n\t\t\t\t\t\t\tselectedName: recordRelativeAccountName,\n\t\t\t\t\t\t\tmodule: moduleName\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthisInstance.copyAddressDetails(\n\t\t\t\t\t\t\telement.data('label'),\n\t\t\t\t\t\t\telement.closest('.js-toggle-panel').data('label'),\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\telement.closest('.js-toggle-panel')\n\t\t\t\t\t\t);\n\t\t\t\t\t\telement.attr('checked', 'checked');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will copy the address details\n\t\t */\n\t\tcopyAddressDetails: function (from, to, data, container) {\n\t\t\tapp.getRecordDetails(data).done((response) => {\n\t\t\t\tthis.addressFieldsData = response['result'];\n\t\t\t\tthis.copyAddress(from, to, true, data['module']);\n\t\t\t\tapp.event.trigger('Edit.CopyAddress', this, from, to, response, data, container);\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function to copy address between fields\n\t\t * @param strings which accepts value as either odd or even\n\t\t */\n\t\tcopyAddress: function (fromLabel, toLabel, relatedRecord, sourceModule) {\n\t\t\tconst thisInstance = this;\n\t\t\tlet formElement = this.getForm(),\n\t\t\t\tstatus = false,\n\t\t\t\taddressMapping = this.addressFieldsMapping,\n\t\t\t\tBlockIds = this.addressFieldsMappingBlockID,\n\t\t\t\tfrom = BlockIds[fromLabel];\n\t\t\tif (relatedRecord === false || sourceModule === false) from = BlockIds[fromLabel];\n\t\t\tlet to = BlockIds[toLabel],\n\t\t\t\tkey,\n\t\t\t\tfromElement,\n\t\t\t\tfromElementLabel,\n\t\t\t\tnameElementFrom,\n\t\t\t\tnameElementTo;\n\t\t\tfor (key in addressMapping) {\n\t\t\t\tnameElementFrom = addressMapping[key] + from;\n\t\t\t\tnameElementTo = addressMapping[key] + to;\n\t\t\t\tif (relatedRecord) {\n\t\t\t\t\tfromElement = thisInstance.addressFieldsData['data'][nameElementFrom];\n\t\t\t\t\tfromElementLabel = thisInstance.addressFieldsData['displayData'][nameElementFrom];\n\t\t\t\t} else {\n\t\t\t\t\tfromElement = formElement.find('[name=\"' + nameElementFrom + '\"]').val();\n\t\t\t\t\tfromElementLabel = formElement.find('[name=\"' + nameElementFrom + '_display\"]').val();\n\t\t\t\t}\n\t\t\t\tlet toElement = formElement.find('[name=\"' + nameElementTo + '\"]'),\n\t\t\t\t\ttoElementLable = formElement.find('[name=\"' + nameElementTo + '_display\"]');\n\t\t\t\tif (fromElement !== '' && fromElement !== '0' && fromElement !== undefined) {\n\t\t\t\t\tif (toElementLable.length > 0) toElementLable.attr('readonly', true);\n\t\t\t\t\tstatus = true;\n\t\t\t\t\ttoElement.val(fromElement);\n\t\t\t\t\ttoElementLable.val(fromElementLabel);\n\t\t\t\t\tif (toElement.is('[data-select2-id]')) {\n\t\t\t\t\t\tif (toElement.val() !== fromElement) {\n\t\t\t\t\t\t\ttoElement.val('');\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttoElement.trigger('change');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttoElement.val('');\n\t\t\t\t\ttoElement.attr('readonly', false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (status === false) {\n\t\t\t\tlet errorMsg;\n\t\t\t\tif (sourceModule === 'Accounts') {\n\t\t\t\t\terrorMsg = 'JS_SELECTED_ACCOUNT_DOES_NOT_HAVE_AN_ADDRESS';\n\t\t\t\t} else if (sourceModule === 'Contacts') {\n\t\t\t\t\terrorMsg = 'JS_SELECTED_CONTACT_DOES_NOT_HAVE_AN_ADDRESS';\n\t\t\t\t} else {\n\t\t\t\t\terrorMsg = 'JS_DOES_NOT_HAVE_AN_ADDRESS';\n\t\t\t\t}\n\t\t\t\tapp.showNotify({\n\t\t\t\t\ttext: app.vtranslate(errorMsg),\n\t\t\t\t\ttype: 'error'\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tregisterReferenceSelectionEvent: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tlet relategField = container.find(\"input[name*='addresslevel']\");\n\t\t\trelategField.on(Vtiger_Edit_Js.referenceSelectionEvent, function (e, data) {\n\t\t\t\tlet blockContainer = $(e.currentTarget).closest('.js-toggle-panel');\n\t\t\t\tthisInstance.copyAddressDetailsRef(data, blockContainer);\n\t\t\t});\n\t\t},\n\t\tcopyAddressDetailsRef: function (data, container) {\n\t\t\tlet thisInstance = this;\n\t\t\tapp\n\t\t\t\t.getRecordDetails(data)\n\t\t\t\t.done(function (data) {\n\t\t\t\t\tlet response = data['result'];\n\t\t\t\t\tthisInstance.mapAddressDetails(response, container);\n\t\t\t\t})\n\t\t\t\t.fail(function (error, err) {});\n\t\t},\n\t\tmapAddressDetails: function (result, container) {\n\t\t\tfor (let key in result) {\n\t\t\t\tif (key.indexOf('addresslevel') != -1) {\n\t\t\t\t\tif (container.find('[name=\"' + key + '\"]').length != 0) {\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + '\"]').val(result['data'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + '\"]').attr('readonly', true);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + '_display\"]').val(result['displayData'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + '_display\"]').attr('readonly', true);\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'a\"]').length != 0 &&\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'a\"]').val() == 0 &&\n\t\t\t\t\t\tresult['data'][key] != 0\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'a\"]').val(result['data'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'a\"]').attr('readonly', true);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'a_display\"]').val(result['displayData'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'a_display\"]').attr('readonly', true);\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'b\"]').length != 0 &&\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'b\"]').val() == 0 &&\n\t\t\t\t\t\tresult['data'][key] != 0\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'b\"]').val(result['data'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'b\"]').attr('readonly', true);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'b_display\"]').val(result['displayData'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'b_display\"]').attr('readonly', true);\n\t\t\t\t\t}\n\t\t\t\t\tif (\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'c\"]').length != 0 &&\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'c\"]').val() == 0 &&\n\t\t\t\t\t\tresult['data'][key] != 0\n\t\t\t\t\t) {\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'c\"]').val(result['data'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'c\"]').attr('readonly', true);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'c_display\"]').val(result['displayData'][key]);\n\t\t\t\t\t\tcontainer.find('[name=\"' + key + 'c_display\"]').attr('readonly', true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tregisterMaskFields: function (container) {\n\t\t\tcontainer.find('[data-inputmask]').inputmask();\n\t\t},\n\t\tregisterSubmitEvent: function () {\n\t\t\tlet editViewForm = this.getForm();\n\t\t\teditViewForm.on('submit', function (e) {\n\t\t\t\t//Form should submit only once for multiple clicks also\n\t\t\t\tif (typeof editViewForm.data('submit') !== 'undefined') {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tdocument.progressLoader = $.progressIndicator({\n\t\t\t\t\t\tmessage: app.vtranslate('JS_SAVE_LOADER_INFO'),\n\t\t\t\t\t\tposition: 'html',\n\t\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\t\tenabled: true\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\teditViewForm.find('.js-toggle-panel').find('.js-block-content').removeClass('d-none');\n\t\t\t\t\tif (editViewForm.validationEngine('validate')) {\n\t\t\t\t\t\t//Once the form is submiting add data attribute to that form element\n\t\t\t\t\t\teditViewForm.data('submit', 'true');\n\t\t\t\t\t\t//on submit form trigger the recordPreSave event\n\t\t\t\t\t\tlet recordPreSaveEvent = $.Event(Vtiger_Edit_Js.recordPreSave);\n\t\t\t\t\t\teditViewForm.trigger(recordPreSaveEvent, { value: 'edit' });\n\t\t\t\t\t\tif (recordPreSaveEvent.isDefaultPrevented()) {\n\t\t\t\t\t\t\t//If duplicate record validation fails, form should submit again\n\t\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\teditViewForm.removeData('submit');\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//If validation fails, form should submit again\n\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\teditViewForm.removeData('submit');\n\t\t\t\t\t\tapp.formAlignmentAfterValidation(editViewForm);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/*\n\t\t * Function to check the view permission of a record after save\n\t\t */\n\t\tregisterRecordPreSaveEventEvent: function (form) {\n\t\t\tform.on(Vtiger_Edit_Js.recordPreSave, (e, data) => {\n\t\t\t\tthis.preSaveValidation(form).done((response) => {\n\t\t\t\t\tif (response !== true) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\tpreSaveValidation: function (form) {\n\t\t\tconst aDeferred = $.Deferred();\n\t\t\tif (form.find('#preSaveValidation').val()) {\n\t\t\t\tdocument.progressLoader = $.progressIndicator({\n\t\t\t\t\tmessage: app.vtranslate('JS_SAVE_LOADER_INFO'),\n\t\t\t\t\tposition: 'html',\n\t\t\t\t\tblockInfo: {\n\t\t\t\t\t\tenabled: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlet formData = new FormData(form[0]);\n\t\t\t\tformData.append('mode', 'preSaveValidation');\n\t\t\t\tAppConnector.request({\n\t\t\t\t\tasync: false,\n\t\t\t\t\turl: 'index.php',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tdata: formData,\n\t\t\t\t\tprocessData: false,\n\t\t\t\t\tcontentType: false\n\t\t\t\t})\n\t\t\t\t\t.done((data) => {\n\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tlet response = data.result;\n\t\t\t\t\t\tfor (let i in response) {\n\t\t\t\t\t\t\tif (response[i].result !== true) {\n\t\t\t\t\t\t\t\tif (response[i].type === 'confirm' && typeof response[i].hash !== 'undefined') {\n\t\t\t\t\t\t\t\t\tapp.showConfirmModal({\n\t\t\t\t\t\t\t\t\t\ttext: response[i].message || '',\n\t\t\t\t\t\t\t\t\t\tconfirmedCallback: () => {\n\t\t\t\t\t\t\t\t\t\t\tlet handlers = {},\n\t\t\t\t\t\t\t\t\t\t\t\thandlerElement = form.find('input[name=\"skipHandlers\"]');\n\t\t\t\t\t\t\t\t\t\t\tif (handlerElement.length) {\n\t\t\t\t\t\t\t\t\t\t\t\thandlers = JSON.parse(handlerElement.val());\n\t\t\t\t\t\t\t\t\t\t\t\thandlerElement.remove();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\thandlers[i] = response[i].hash;\n\t\t\t\t\t\t\t\t\t\t\tform.append(\n\t\t\t\t\t\t\t\t\t\t\t\t$('<input>', { name: 'skipHandlers', value: JSON.stringify(handlers), type: 'hidden' })\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tform.submit();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\taDeferred.resolve(false);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\t\ttypeof response[i].showModal !== 'undefined' &&\n\t\t\t\t\t\t\t\t\ttypeof response[i].showModal.url !== 'undefined'\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tapp.showModalWindow(null, response[i].showModal.url, function (modalContainer) {\n\t\t\t\t\t\t\t\t\t\tapp.registerModalController(undefined, modalContainer, function (_, instance) {\n\t\t\t\t\t\t\t\t\t\t\tinstance.formContainer = form;\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\ttext: response[i].message ? response[i].message : app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (response[i].hoverField != undefined) {\n\t\t\t\t\t\t\t\t\tform.find('[name=\"' + response[i].hoverField + '\"]').focus();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\taDeferred.resolve(data.result.length <= 0);\n\t\t\t\t\t})\n\t\t\t\t\t.fail((textStatus, errorThrown) => {\n\t\t\t\t\t\tdocument.progressLoader.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t});\n\t\t\t\t\t\tapp.errorLog(textStatus, errorThrown);\n\t\t\t\t\t\taDeferred.resolve(false);\n\t\t\t\t\t});\n\t\t\t} else {\n\t\t\t\taDeferred.resolve(true);\n\t\t\t}\n\n\t\t\treturn aDeferred.promise();\n\t\t},\n\t\tregisterLeavePageWithoutSubmit: function (form) {\n\t\t\tif (\n\t\t\t\ttypeof CKEDITOR !== 'undefined' &&\n\t\t\t\ttypeof CKEDITOR.instances !== 'undefined' &&\n\t\t\t\tObject.keys(CKEDITOR.instances).length\n\t\t\t) {\n\t\t\t\tCKEDITOR.on('instanceReady', function (e) {\n\t\t\t\t\tlet initialFormData = form.serialize();\n\t\t\t\t\twindow.onbeforeunload = function (e) {\n\t\t\t\t\t\tif (initialFormData != form.serialize() && form.data('submit') != 'true') {\n\t\t\t\t\t\t\treturn app.vtranslate('JS_CHANGES_WILL_BE_LOST');\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tlet initialFormData = form.serialize();\n\t\t\t\twindow.onbeforeunload = function (e) {\n\t\t\t\t\tif (initialFormData != form.serialize() && form.data('submit') != 'true') {\n\t\t\t\t\t\treturn app.vtranslate('JS_CHANGES_WILL_BE_LOST');\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\tstretchCKEditor: function () {\n\t\t\tlet row = $('.js-editor').parents('.fieldRow');\n\t\t\tlet td = $('.js-editor').parent();\n\t\t\t$(row).find('.fieldLabel').remove();\n\t\t\t$(td).removeClass('col-md-10');\n\t\t\t$(td).addClass('col-md-12');\n\t\t},\n\t\t/**\n\t\t * Function to register event for ckeditor for description field\n\t\t */\n\t\tregisterEventForEditor: function () {\n\t\t\tlet form = this.getForm();\n\t\t\t$.each(form.find('.js-editor:not(.js-inventory-item-comment)'), (key, data) => {\n\t\t\t\tthis.loadEditorElement($(data));\n\t\t\t});\n\t\t},\n\t\tloadEditorElement: function (noteContentElement) {\n\t\t\tApp.Fields.Text.Editor.register(noteContentElement);\n\t\t},\n\t\tregisterHelpInfo: function (form) {\n\t\t\tif (!form) {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\t\t\tapp.showPopoverElementView(form.find('.js-help-info'));\n\t\t},\n\t\tregisterBlockStatusCheckOnLoad: function () {\n\t\t\tlet blocks = this.getForm().find('.js-toggle-panel');\n\t\t\tlet module = this.moduleName;\n\t\t\tblocks.each(function (index, block) {\n\t\t\t\tlet currentBlock = $(block);\n\t\t\t\tif (\n\t\t\t\t\tcurrentBlock.find('.js-field-block-column').length !== 0 &&\n\t\t\t\t\tcurrentBlock.find('.js-field-block-column:not(.d-none)').length === 0\n\t\t\t\t) {\n\t\t\t\t\tcurrentBlock.addClass('d-none');\n\t\t\t\t}\n\t\t\t\tlet dynamicAttr = currentBlock.attr('data-dynamic');\n\t\t\t\tif (typeof dynamicAttr !== typeof undefined && dynamicAttr !== false) {\n\t\t\t\t\tlet headerAnimationElement = currentBlock.find('.js-block-toggle').not('.d-none');\n\t\t\t\t\tlet bodyContents = currentBlock.find('.blockContent');\n\t\t\t\t\tlet blockId = headerAnimationElement.data('id');\n\t\t\t\t\tlet cacheKey = module + '.' + blockId;\n\t\t\t\t\tlet value = app.cacheGet(cacheKey, null);\n\t\t\t\t\tif (value != null) {\n\t\t\t\t\t\tif (value == 1) {\n\t\t\t\t\t\t\theaderAnimationElement.addClass('d-none');\n\t\t\t\t\t\t\tcurrentBlock.find(\"[data-mode='show']\").removeClass('d-none');\n\t\t\t\t\t\t\tbodyContents.removeClass('d-none');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\theaderAnimationElement.addClass('d-none');\n\t\t\t\t\t\t\tcurrentBlock.find(\"[data-mode='hide']\").removeClass('d-none');\n\t\t\t\t\t\t\tbodyContents.addClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Visibility check block\n\t\t */\n\t\tcheckVisibilityBlocks: function () {\n\t\t\tthis.getForm()\n\t\t\t\t.find('.js-toggle-panel')\n\t\t\t\t.each(function (index, block) {\n\t\t\t\t\tlet currentBlock = $(block);\n\t\t\t\t\tif (currentBlock.find('.js-field-block-column').length !== 0) {\n\t\t\t\t\t\tif (currentBlock.find('.js-field-block-column:not(.d-none)').length === 0) {\n\t\t\t\t\t\t\tcurrentBlock.addClass('d-none');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcurrentBlock.removeClass('d-none');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\t\tregisterAutoloadAddress: function () {\n\t\t\tconst self = this;\n\t\t\tthis.getForm()\n\t\t\t\t.find('.js-search-address')\n\t\t\t\t.each(function (_index, e) {\n\t\t\t\t\tlet search = $(e);\n\t\t\t\t\tlet container = search.closest('.js-block-content');\n\t\t\t\t\tlet input = search.find('.js-autoload-address');\n\t\t\t\t\tinput\n\t\t\t\t\t\t.autocomplete({\n\t\t\t\t\t\t\tsource: function (request, response) {\n\t\t\t\t\t\t\t\tAppConnector.request({\n\t\t\t\t\t\t\t\t\tmodule: self.moduleName,\n\t\t\t\t\t\t\t\t\taction: 'Fields',\n\t\t\t\t\t\t\t\t\tmode: 'findAddress',\n\t\t\t\t\t\t\t\t\ttype: search.find('.js-select-operator').val(),\n\t\t\t\t\t\t\t\t\tvalue: request.term\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.done(function (requestData) {\n\t\t\t\t\t\t\t\t\t\tif (requestData.result === false) {\n\t\t\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\t\t\ttext: app.vtranslate('JS_ERROR'),\n\t\t\t\t\t\t\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t} else if (requestData.result.length) {\n\t\t\t\t\t\t\t\t\t\t\tresponse(requestData.result);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tresponse([{ label: app.vtranslate('JS_NO_RESULTS_FOUND'), value: '' }]);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.fail(function (_textStatus, _errorThrown, jqXHR) {\n\t\t\t\t\t\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\t\t\t\t\t\ttext: jqXHR.responseJSON.error.message,\n\t\t\t\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\tresponse([{ label: app.vtranslate('JS_NO_RESULTS_FOUND'), value: '' }]);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tminLength: input.data('min'),\n\t\t\t\t\t\t\tselect: function (_event, ui) {\n\t\t\t\t\t\t\t\t$.each(ui.item.address, function (index, value) {\n\t\t\t\t\t\t\t\t\tlet field = container.find('.fieldValue [name^=' + index + ']');\n\t\t\t\t\t\t\t\t\tif (field.length && value) {\n\t\t\t\t\t\t\t\t\t\tif (typeof value !== 'object') {\n\t\t\t\t\t\t\t\t\t\t\tvalue = [value];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$.each(value, function (_idx, v) {\n\t\t\t\t\t\t\t\t\t\t\tlet select = false,\n\t\t\t\t\t\t\t\t\t\t\t\telement = false;\n\t\t\t\t\t\t\t\t\t\t\tif (field.prop('tagName') === 'SELECT') {\n\t\t\t\t\t\t\t\t\t\t\t\tif (typeof v === 'object') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$.each(v, function (idx, x) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telement = field.find('option[data-' + idx + \"='\" + x + \"']\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (x && element.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselect = element.val();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\telement = field.find('option:contains(' + v + ')');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (v && element.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselect = element.val();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telement = field.find('option[value=\"' + v + '\"]');\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (v && element.length) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselect = element.val();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tselect = v;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (select) {\n\t\t\t\t\t\t\t\t\t\t\t\tfield.val(select).change();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tfield.val('').change();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tui.item.value = input.val();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.autocomplete('instance')._renderItem = function (ul, item) {\n\t\t\t\t\t\treturn $('<li>')\n\t\t\t\t\t\t\t.append(`<div><span class=\"fi fi-${item.countryCode} mr-2\"></span>${item.label}</div>`)\n\t\t\t\t\t\t\t.appendTo(ul);\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t},\n\t\tsetEnabledFields: function (element) {\n\t\t\tlet fieldValue = element.closest('.fieldValue');\n\t\t\tlet fieldName = fieldValue.find('input.sourceField').attr('name');\n\t\t\tlet fieldDisplay = fieldValue.find('#' + fieldName + '_display');\n\t\t\tfieldValue.find('button').removeAttr('disabled');\n\t\t\tif (fieldDisplay.val() == '') {\n\t\t\t\tfieldValue.find('input').removeAttr('readonly');\n\t\t\t}\n\t\t\tfieldValue.find('.referenceModulesListGroup').removeClass('d-none');\n\t\t\tlet placeholder = fieldDisplay.attr('placeholderDisabled');\n\t\t\tfieldDisplay.removeAttr('placeholderDisabled');\n\t\t\tfieldDisplay.attr('placeholder', placeholder);\n\t\t\tfieldValue.find('.referenceModulesList').attr('required', 'required');\n\t\t},\n\t\tsetDisabledFields: function (element) {\n\t\t\tlet fieldValue = element.closest('.fieldValue');\n\t\t\tlet fieldName = fieldValue.find('input.sourceField').attr('name');\n\t\t\tlet fieldDisplay = fieldValue.find('#' + fieldName + '_display');\n\t\t\tfieldValue.find('input').attr('readonly', 'readonly');\n\t\t\tfieldValue.find('button').attr('disabled', 'disabled');\n\t\t\tfieldValue.find('.referenceModulesListGroup').addClass('d-none');\n\t\t\tlet placeholder = fieldDisplay.attr('placeholder');\n\t\t\tfieldDisplay.removeAttr('placeholder');\n\t\t\tfieldDisplay.attr('placeholderDisabled', placeholder);\n\t\t\tfieldValue.find('.referenceModulesList').removeAttr('required');\n\t\t},\n\t\tgetMappingRelatedField: function (sourceField, sourceFieldModule, container) {\n\t\t\tconst mappingRelatedField = container.find('input[name=\"mappingRelatedField\"]').val();\n\t\t\tconst mappingRelatedModule = mappingRelatedField ? JSON.parse(mappingRelatedField) : [];\n\t\t\tif (\n\t\t\t\ttypeof mappingRelatedModule[sourceField] !== 'undefined' &&\n\t\t\t\ttypeof mappingRelatedModule[sourceField][sourceFieldModule] !== 'undefined'\n\t\t\t) {\n\t\t\t\treturn mappingRelatedModule[sourceField][sourceFieldModule];\n\t\t\t}\n\t\t\treturn [];\n\t\t},\n\t\tregisterValidationsFields: function (container) {\n\t\t\tlet params = app.validationEngineOptionsForRecord;\n\t\t\tcontainer.validationEngine(params);\n\t\t},\n\t\tcheckReferencesField: function (container, clear) {\n\t\t\tlet thisInstance = this;\n\t\t\tlet activeProcess = false,\n\t\t\t\tactiveSubProcess = false;\n\t\t\tif (!CONFIG.fieldsReferencesDependent) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcontainer.find('input[data-fieldtype=\"referenceLink\"]').each(function (index, element) {\n\t\t\t\telement = $(element);\n\t\t\t\tlet t = true;\n\t\t\t\tif (element.closest('.tab-pane').length > 0) {\n\t\t\t\t\tt = false;\n\t\t\t\t\tif (element.closest('.tab-pane.active').length > 0) {\n\t\t\t\t\t\tt = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlet referenceLink = element.val();\n\t\t\t\tif (t && referenceLink != '' && referenceLink != '0') {\n\t\t\t\t\tactiveProcess = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('input[data-fieldtype=\"referenceProcess\"]').each(function (index, element) {\n\t\t\t\telement = $(element);\n\t\t\t\tif (activeProcess) {\n\t\t\t\t\tthisInstance.setEnabledFields(element);\n\t\t\t\t} else {\n\t\t\t\t\tif (clear) {\n\t\t\t\t\t\tthisInstance.clearFieldValue(element);\n\t\t\t\t\t}\n\t\t\t\t\tthisInstance.setDisabledFields(element);\n\t\t\t\t}\n\n\t\t\t\tlet t = true;\n\t\t\t\tif (element.closest('.tab-pane').length > 0) {\n\t\t\t\t\tt = false;\n\t\t\t\t\tif (element.closest('.tab-pane.active').length > 0) {\n\t\t\t\t\t\tt = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet referenceLink = element.val();\n\t\t\t\tif (t && referenceLink != '' && referenceLink != '0') {\n\t\t\t\t\tactiveSubProcess = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tcontainer.find('input[data-fieldtype=\"referenceSubProcess\"]').each(function (index, element) {\n\t\t\t\telement = $(element);\n\t\t\t\tlet processfieldElement = element.closest('.fieldValue');\n\t\t\t\tlet length = processfieldElement.find('.referenceModulesList option[disabled!=\"disabled\"]').length;\n\t\t\t\tif (activeSubProcess && length > 0) {\n\t\t\t\t\tthisInstance.setEnabledFields(element);\n\t\t\t\t} else {\n\t\t\t\t\tif (clear) {\n\t\t\t\t\t\tthisInstance.clearFieldValue(element);\n\t\t\t\t\t}\n\t\t\t\t\tthisInstance.setDisabledFields(element);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tcheckSubProcessModulesList: function (element) {\n\t\t\tlet option = element.find('option:selected');\n\t\t\tif (option.data('is-quickcreate') != 1) {\n\t\t\t\telement.closest('.fieldValue').find('.createReferenceRecord').addClass('d-none');\n\t\t\t} else {\n\t\t\t\telement.closest('.fieldValue').find('.createReferenceRecord').removeClass('d-none');\n\t\t\t}\n\t\t},\n\t\tcheckReferenceModulesList: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tlet processfieldElement = container.find('input[data-fieldtype=\"referenceProcess\"]').closest('.fieldValue');\n\t\t\tlet referenceProcess = processfieldElement.find('input[name=\"popupReferenceModule\"]').val();\n\t\t\tlet subProcessfieldElement = container.find('input[data-fieldtype=\"referenceSubProcess\"]').closest('.fieldValue');\n\t\t\tVtiger_Helper_Js.hideOptions(subProcessfieldElement.find('.referenceModulesList'), 'parent', referenceProcess);\n\t\t\tlet subProcessValue = subProcessfieldElement.find('.referenceModulesList').val();\n\t\t\tsubProcessfieldElement.find('[name=\"popupReferenceModule\"]').val(subProcessValue);\n\t\t\tthisInstance.checkSubProcessModulesList(subProcessfieldElement.find('.referenceModulesList'));\n\t\t},\n\t\tregisterReferenceFields: function (container) {\n\t\t\tlet thisInstance = this;\n\t\t\tif (!CONFIG.fieldsReferencesDependent) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthisInstance.checkReferenceModulesList(container);\n\t\t\tthisInstance.checkReferencesField(container, false);\n\t\t\tcontainer.find('.sourceField').on(Vtiger_Edit_Js.referenceSelectionEvent, function (e, data) {\n\t\t\t\tthisInstance.checkReferencesField(container, true);\n\t\t\t});\n\t\t\tcontainer.find('.sourceField').on(Vtiger_Edit_Js.referenceDeSelectionEvent, function (e) {\n\t\t\t\tthisInstance.checkReferencesField(container, true);\n\t\t\t});\n\t\t\tcontainer\n\t\t\t\t.find('input[data-fieldtype=\"referenceProcess\"]')\n\t\t\t\t.closest('.fieldValue')\n\t\t\t\t.find('.referenceModulesList')\n\t\t\t\t.on('change', function () {\n\t\t\t\t\tthisInstance.checkReferenceModulesList(container);\n\t\t\t\t});\n\t\t\tcontainer\n\t\t\t\t.find('input[data-fieldtype=\"referenceSubProcess\"]')\n\t\t\t\t.closest('.fieldValue')\n\t\t\t\t.find('.referenceModulesList')\n\t\t\t\t.on('change', function (e) {\n\t\t\t\t\tthisInstance.checkSubProcessModulesList($(e.currentTarget));\n\t\t\t\t});\n\t\t},\n\t\tregisterFocusFirstField: function (container, afterTimeout) {\n\t\t\tlet elementToFocus, elementToFocusTabindex;\n\t\t\tif (afterTimeout === undefined && container.closest('.js-modal-container').length) {\n\t\t\t\tsetTimeout((_) => {\n\t\t\t\t\tthis.registerFocusFirstField(container, true);\n\t\t\t\t}, 500);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcontainer\n\t\t\t\t.find(\n\t\t\t\t\t'.fieldValue input.form-control:not([type=hidden],.dateField,.clockPicker), .fieldValue input[type=checkbox], .select2-selection.form-control'\n\t\t\t\t)\n\t\t\t\t.each(function (i, e) {\n\t\t\t\t\tlet element = $(e);\n\t\t\t\t\tif (!element.prop('readonly') && !element.prop('disabled')) {\n\t\t\t\t\t\telement = element.get(0);\n\t\t\t\t\t\tif (element.type !== 'number' && element.type !== 'checkbox' && element.value !== undefined) {\n\t\t\t\t\t\t\tlet elemLen = element.value.length;\n\t\t\t\t\t\t\telement.selectionStart = elemLen;\n\t\t\t\t\t\t\telement.selectionEnd = elemLen;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (i === 0 || !elementToFocus) {\n\t\t\t\t\t\t\telementToFocus = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet tabindex = $(element).attr('tabindex');\n\t\t\t\t\t\tif (tabindex > 0 && elementToFocusTabindex === undefined) {\n\t\t\t\t\t\t\telementToFocusTabindex = tabindex;\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (tabindex > 0 && tabindex < elementToFocusTabindex) {\n\t\t\t\t\t\t\telementToFocusTabindex = tabindex;\n\t\t\t\t\t\t\telementToFocus = element;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tif (elementToFocus) {\n\t\t\t\telementToFocus.focus();\n\t\t\t}\n\t\t},\n\t\tregisterCopyValue: function (container) {\n\t\t\tcontainer.find('.fieldValue [data-copy-to-field]').on('change', function (e) {\n\t\t\t\tlet element = $(e.currentTarget);\n\t\t\t\tcontainer.find('[name=\"' + element.data('copyToField') + '\"]').val(element.val());\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register multi image upload fields\n\t\t * @param {HTMLElement|jQuery} container\n\t\t */\n\t\tregisterMultiImageFields(container) {\n\t\t\treturn App.Fields.MultiImage.register(container);\n\t\t},\n\t\t/**\n\t\t * Register inventory controller\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterInventoryController(container) {\n\t\t\tif (typeof Vtiger_Inventory_Js !== 'undefined') {\n\t\t\t\tthis.inventoryController = Vtiger_Inventory_Js.getInventoryInstance(container);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Register record collector modal\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterRecordCollectorModal: function (container) {\n\t\t\tconst self = this;\n\t\t\tcontainer.on('click', '.js-record-collector-modal', function (e) {\n\t\t\t\te.preventDefault();\n\t\t\t\tlet element = $(this);\n\t\t\t\tlet formData = container.serializeFormData();\n\t\t\t\tformData['view'] = 'RecordCollector';\n\t\t\t\tformData['collectorType'] = element.data('type');\n\t\t\t\tdelete formData['action'];\n\t\t\t\tAppConnector.request(formData).done(function (html) {\n\t\t\t\t\tapp.showModalWindow(\n\t\t\t\t\t\thtml,\n\t\t\t\t\t\t(container) => {\n\t\t\t\t\t\t\tlet modalForm = container.find('form.js-record-collector__form');\n\t\t\t\t\t\t\tlet summary = container.find('.js-record-collector__summary');\n\t\t\t\t\t\t\tmodalForm.validationEngine(app.validationEngineOptions);\n\t\t\t\t\t\t\tmodalForm.on('submit', function (e) {\n\t\t\t\t\t\t\t\tif (modalForm.validationEngine('validate')) {\n\t\t\t\t\t\t\t\t\tsummary.html('');\n\t\t\t\t\t\t\t\t\tsummary.progressIndicator({});\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\tAppConnector.request(modalForm.serializeFormData()).done(function (data) {\n\t\t\t\t\t\t\t\t\t\tsummary.progressIndicator({ mode: 'hide' });\n\t\t\t\t\t\t\t\t\t\tsummary.html(data);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tlet recordForm = self.getForm();\n\t\t\t\t\t\t\tcontainer.on('click', '.js-record-collector__select', function () {\n\t\t\t\t\t\t\t\tcontainer\n\t\t\t\t\t\t\t\t\t.find(`.js-record-collector__column[data-column=\"${this.dataset.column}\"] input`)\n\t\t\t\t\t\t\t\t\t.prop('checked', true);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tcontainer.on('click', '.js-record-collector__fill_fields', function () {\n\t\t\t\t\t\t\t\tlet formData = container.find('.js-record-collector__fill_form').serializeFormData();\n\t\t\t\t\t\t\t\t$.each(formData, function (key, value) {\n\t\t\t\t\t\t\t\t\tif (value !== '') {\n\t\t\t\t\t\t\t\t\t\tlet fieldElement = recordForm.find(`[name=\"${key}\"]`);\n\t\t\t\t\t\t\t\t\t\tif (fieldElement.length) {\n\t\t\t\t\t\t\t\t\t\t\tfieldElement.setValue(value);\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\trecordForm.append(`<input type=\"hidden\" name=\"${key}\" value=\"${value}\" />`);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tapp.hideModalWindow(null, 'collectorModal');\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ modalId: 'collectorModal' }\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register account name function\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterAccountName: function (container) {\n\t\t\tlet first = container.find('.js-first-name');\n\t\t\tlet firstInput = first.find('input');\n\t\t\tlet last = container.find('.js-last-name');\n\t\t\tlet lastInput = last.find('input');\n\t\t\tlet full = container.find('.js-account-name');\n\t\t\tlet fullInput = full.find('input');\n\t\t\tlet legalForm = container.find('select[name=\"legal_form\"]');\n\t\t\tlet legalFormVal = legalForm.val();\n\t\t\tfirstInput.keyup(function () {\n\t\t\t\tfullInput.val(this.value + '|##|' + lastInput.val());\n\t\t\t});\n\t\t\tlastInput.keyup(function () {\n\t\t\t\tfullInput.val(firstInput.val() + '|##|' + this.value);\n\t\t\t});\n\t\t\tlegalForm.change(function () {\n\t\t\t\tif (this.value == 'PLL_NATURAL_PERSON') {\n\t\t\t\t\tfull.addClass('d-none');\n\t\t\t\t\tfullInput.val(firstInput.val() + '|##|' + lastInput.val());\n\t\t\t\t\tfirst.removeClass('d-none');\n\t\t\t\t\tlast.removeClass('d-none');\n\t\t\t\t} else if (legalFormVal == 'PLL_NATURAL_PERSON') {\n\t\t\t\t\tfull.removeClass('d-none');\n\t\t\t\t\tfirst.addClass('d-none');\n\t\t\t\t\tlast.addClass('d-none');\n\t\t\t\t\tfullInput.val('');\n\t\t\t\t}\n\t\t\t\tlegalFormVal = this.value;\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Trigger record edit view events\n\t\t * @param {object} data\n\t\t */\n\t\ttriggerRecordEditEvents: function (data) {\n\t\t\tconst self = this,\n\t\t\t\tform = this.getForm();\n\t\t\tif (typeof data['changeValues'] == 'object') {\n\t\t\t\t$.each(data['changeValues'], function (_, field) {\n\t\t\t\t\tself.setFieldValue(field);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (typeof data['changeOptions'] != 'undefined') {\n\t\t\t\t$.each(data['changeOptions'], function (fieldName, options) {\n\t\t\t\t\tself.setFieldOptions(fieldName, options);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (typeof data['hoverField'] != 'undefined') {\n\t\t\t\tform.find(`[name=\"${data['hoverField']}\"]`).focus();\n\t\t\t}\n\t\t\tif (typeof data['showNotify'] != 'undefined') {\n\t\t\t\tapp.showNotify(data['showNotify']);\n\t\t\t}\n\t\t\tif (typeof data['showModal'] != 'undefined') {\n\t\t\t\tapp.showModalWindow(null, data['showModal']['url']);\n\t\t\t}\n\t\t\tif (typeof data['showFields'] != 'undefined') {\n\t\t\t\t$.each(data['showFields'], function (_, fieldName) {\n\t\t\t\t\tform.find(`.js-field-block-column[data-field=\"${fieldName}\"]`).removeClass('d-none');\n\t\t\t\t\tself.checkVisibilityBlocks();\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (typeof data['hideFields'] != 'undefined') {\n\t\t\t\t$.each(data['hideFields'], function (_, fieldName) {\n\t\t\t\t\tform.find(`.js-field-block-column[data-field=\"${fieldName}\"]`).addClass('d-none');\n\t\t\t\t\tself.checkVisibilityBlocks();\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Set field value\n\t\t * @param {object} params\n\t\t */\n\t\tsetFieldValue: function (params) {\n\t\t\tconst fieldElement = this.getForm().find(`[name=\"${params['fieldName']}\"]`),\n\t\t\t\tfieldInfo = fieldElement.data('fieldinfo');\n\t\t\tif (fieldElement.is('select')) {\n\t\t\t\tif (fieldElement.find(`option[value=\"${params['value']}\"]`).length) {\n\t\t\t\t\tfieldElement.val(params['value']).trigger('change');\n\t\t\t\t} else if (fieldInfo.picklistvalues.hasOwnProperty(params['value'])) {\n\t\t\t\t\tfieldElement.append(new Option(params['value'], params['value'], true, true)).trigger('change');\n\t\t\t\t}\n\t\t\t} else if (fieldElement.attr('type') == 'checkbox') {\n\t\t\t\tfieldElement.prop('checked', params['value'] == '1').trigger('change');\n\t\t\t} else if ('reference' === fieldElement.data('fieldtype')) {\n\t\t\t\tthis.setReferenceFieldValue(fieldElement.closest('.js-field-block-column'), {\n\t\t\t\t\tid: params['value'],\n\t\t\t\t\tname: params['display']\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tfieldElement.val(params['value']);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Set field options\n\t\t * @param {string} fieldName\n\t\t * @param {object} options\n\t\t */\n\t\tsetFieldOptions: function (fieldName, options) {\n\t\t\tconst fieldElement = this.getForm().find(`[name=\"${fieldName}\"]`),\n\t\t\t\tfieldInfo = fieldElement.data('fieldinfo');\n\t\t\tif (fieldElement.is('select') && fieldInfo) {\n\t\t\t\tconst val = fieldElement.val() ?? '',\n\t\t\t\t\tfieldValue = fieldElement.closest('.fieldValue'),\n\t\t\t\t\tcurrentValues = [...fieldElement.get(0).options]\n\t\t\t\t\t\t.map((o) => o.value)\n\t\t\t\t\t\t.filter((e) => e !== '')\n\t\t\t\t\t\t.sort();\n\t\t\t\tlet newOptions = new $();\n\t\t\t\tif (!fieldInfo.mandatory) {\n\t\t\t\t\tnewOptions = newOptions.add(\n\t\t\t\t\t\tnew Option(app.vtranslate('JS_SELECT_AN_OPTION'), '', false, !val || !options.includes(val))\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$.each(options, (_, e) => {\n\t\t\t\t\tnewOptions = newOptions.add(new Option(fieldInfo['picklistvalues'][e], e, false, val == e));\n\t\t\t\t});\n\n\t\t\t\tconst newValues = [...newOptions.map((_, e) => e.value)].filter((e) => e !== '').sort();\n\t\t\t\tif (currentValues.length === newValues.length && currentValues.every((e, i) => e === newValues[i])) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet selected = newOptions.filter(':selected').length > 0;\n\t\t\t\tfieldElement.html(newOptions);\n\t\t\t\tlet change = val && val !== fieldElement.val();\n\t\t\t\tif ((val === '' && !selected) || change) {\n\t\t\t\t\tfieldElement.val(null);\n\t\t\t\t}\n\t\t\t\tif (change) {\n\t\t\t\t\tfieldValue.addClass('border border-info');\n\t\t\t\t\tfieldElement.trigger('change');\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tfieldValue.removeClass('border border-info');\n\t\t\t\t\t}, 5000);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Check if pre save validation is active\n\t\t * @returns {bool}\n\t\t */\n\t\tcheckPreSaveValidation: function () {\n\t\t\tlet validation = true;\n\t\t\tif (\n\t\t\t\ttypeof app.pageController.getForm !== 'undefined' &&\n\t\t\t\tapp.pageController.getForm().find('#preSaveValidation').length !== 0\n\t\t\t) {\n\t\t\t\tvalidation = app.pageController.getForm().find('#preSaveValidation').val() == 1;\n\t\t\t}\n\t\t\treturn validation;\n\t\t},\n\t\t/**\n\t\t * Register change value handler events\n\t\t * @param {jQuery} container\n\t\t */\n\t\tregisterChangeValueHandlerEvent: function (container) {\n\t\t\tconst event = container.find('.js-change-value-event');\n\t\t\tif (event.length <= 0 || event.val() === '[]') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst fields = JSON.parse(event.val());\n\t\t\t$.each(fields, (_, fieldName) => {\n\t\t\t\tcontainer\n\t\t\t\t\t.find(`[name=\"${fieldName}\"],[name=\"${fieldName}[]\"]`)\n\t\t\t\t\t.on(`change ${Vtiger_Edit_Js.referenceSelectionEvent} ${Vtiger_Edit_Js.referenceDeSelectionEvent}`, () => {\n\t\t\t\t\t\tthis.sendChangeValueHandlerEvent(container.serializeFormData());\n\t\t\t\t\t});\n\t\t\t});\n\t\t\tthis.sendChangeValueHandlerEvent(container.serializeFormData());\n\t\t},\n\t\t/**\n\t\t * Send change value handler events\n\t\t * @param {object} formData\n\t\t */\n\t\tsendChangeValueHandlerEvent: function (formData) {\n\t\t\tformData['action'] = 'ChangeValueHandler';\n\t\t\tdelete formData['view'];\n\t\t\tlet progress = $.progressIndicator({ position: 'html', blockInfo: { enabled: true } });\n\t\t\tAppConnector.request(formData).done((response) => {\n\t\t\t\t\t$.each(response.result, (_, data) => {\n\t\t\t\t\t\tthis.triggerRecordEditEvents(data);\n\t\t\t\t\t});\n\t\t\t\t\tprogress.progressIndicator({ mode: 'hide' });\n\t\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Register keyboard shortcuts events\n\t\t */\n\t\tregisterKeyboardShortcutsEvent: function () {\n\t\t\tdocument.addEventListener('keydown', (event) => {\n\t\t\t\tif (event.shiftKey && event.ctrlKey && event.code === 'KeyS') {\n\t\t\t\t\tlet form = event.target.closest('form');\n\t\t\t\t\tif (form) {\n\t\t\t\t\t\t$(form).trigger('submit');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tform = $(event.target).find('form');\n\t\t\t\t\t\tif (form.length && form.hasClass('recordEditView')) {\n\t\t\t\t\t\t\tform.last().trigger('submit');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Function which will register basic events which will be used in quick create as well\n\t\t *\n\t\t */\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis.registerEventForEditor();\n\t\t\tthis.stretchCKEditor();\n\t\t\tthis.referenceModulePopupRegisterEvent(container);\n\t\t\tthis.registerAutoCompleteFields(container);\n\t\t\tthis.registerClearReferenceSelectionEvent(container);\n\t\t\tthis.registerPreventingEnterSubmitEvent(container);\n\t\t\tthis.registerTimeFields(container);\n\t\t\tthis.registerRecordPreSaveEventEvent(container);\n\t\t\tthis.registerReferenceSelectionEvent(container);\n\t\t\tthis.registerChangeValueHandlerEvent(container);\n\t\t\tthis.registerMaskFields(container);\n\t\t\tthis.registerHelpInfo(container);\n\t\t\tthis.registerReferenceFields(container);\n\t\t\tthis.registerFocusFirstField(container);\n\t\t\tthis.registerCopyValue(container);\n\t\t\tthis.registerMultiImageFields(container);\n\t\t\tthis.registerReferenceCreate(container);\n\t\t\tthis.registerRecordCollectorModal(container);\n\t\t\tthis.registerAccountName(container);\n\t\t\tthis.registerKeyboardShortcutsEvent();\n\t\t\tApp.Fields.MultiEmail.register(container);\n\t\t\tApp.Fields.MultiDependField.register(container);\n\t\t\tApp.Fields.Tree.register(container);\n\t\t\tApp.Fields.MultiCurrency.register(container);\n\t\t\tApp.Fields.MeetingUrl.register(container);\n\t\t\tApp.Fields.ChangesJson.register(container);\n\t\t\tApp.Fields.MultiReference.register(container);\n\t\t\tApp.Fields.Password.register(container);\n\t\t\tApp.Components.ActivityNotifier.register(container);\n\t\t\tApp.Fields.MultiAttachment.register(container);\n\t\t},\n\t\tregisterEvents: function () {\n\t\t\tlet editViewForm = this.getForm();\n\t\t\tif (!this.proceedRegisterEvents()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.registerInventoryController(editViewForm);\n\t\t\tapp.registerBlockAnimationEvent(editViewForm);\n\t\t\tthis.registerBlockStatusCheckOnLoad();\n\t\t\tthis.registerBasicEvents(editViewForm);\n\t\t\tthis.registerEventForCopyAddress();\n\t\t\tthis.registerSubmitEvent();\n\t\t\tthis.registerLeavePageWithoutSubmit(editViewForm);\n\t\t\tthis.registerValidationsFields(editViewForm);\n\t\t\tthis.registerAutoloadAddress();\n\t\t\teditViewForm.find('.js-form-submit-btn').prop('disabled', false);\n\t\t}\n\t}\n);\n"],"names":["_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","Object","prototype","toString","call","slice","constructor","name","Array","from","test","iter","Symbol","iterator","isArray","len","length","i","arr2","_typeof","$","Class","referenceSelectionEvent","referenceDeSelectionEvent","recordPreSave","editInstance","inventoryController","getInstanceByModuleName","moduleName","app","getModuleName","moduleClassName","fallbackClassName","instance","parentModule","getParentModuleName","window","getInstance","Vtiger_Edit_Js","saveAjax","params","progressIndicator","arguments","aDeferred","Deferred","isEmptyObject","reject","promise","record","getRecordId","module","action","data","async","dataType","document","progressLoader","message","vtranslate","position","blockInfo","enabled","saveAjaxValidation","then","response","mode","AppConnector","request","done","responseData","resolve","fail","jqXHR","textStatus","errorThrown","showNotify","text","type","success","_this","checkPreSaveValidation","paramsTemp","JSON","parse","stringify","result","lock","_loop","hash","showConfirmModal","confirmedCallback","handlers","skipHandlers","form","responsePart","rejectedCallback","showModal","url","showModalWindow","modalContainer","registerModalController","_","formContainer","formElement","relationOperation","getForm","setForm","element","val","getRecordsListParams","container","closest","sourceModule","popupReferenceModule","sourceFieldElement","sourceField","attr","sourceRecordElement","sourceRecordId","isMultiple","filterFields","mappingRelatedField","find","mappingRelatedModule","each","index","value","mapFieldElement","listFilterFieldsJson","listFilterFields","src_module","src_field","src_record","searchParamsElement","searchParams","search_params","modalParamsElement","modal_params","lockedFieldsElement","lockedFields","fieldElement","multi_select","showRecordsList","e","_this2","parentElem","target","_modal","setSelectEvent","setReferenceFieldValue","thisInstance","sourceFieldDisplay","fieldDisplayElement","selectedName","id","trigger","decodeHTML","validationEngine","getMappingRelatedField","getRecordDetails","event","key","fieldinfo","displayData","mapFieldElementMultiselect","multipleAttr","splitValues","split","is","appendTo","picklistvalues","hasOwnProperty","newOption","Option","append","mapFieldDisplayElement","referenceModulesList","getRelationOperation","proceedRegisterEvents","referenceModulePopupRegisterEvent","_this3","on","moduleList","App","Fields","Picklist","showSelect2ElementView","currentTarget","referenceModuleElement","prevSelectedReferenceModule","getReferencedModuleName","parenElement","searchModuleNames","error","getReferenceSearchParams","tdElement","searchModule","search_module","registerAutoCompleteFields","autocomplete","delay","minLength","source","inputElement","searchValue","term","search_value","reponseDataList","serverDataFormat","label","push","field","select","ui","selectedItemData","item","change","open","menu","css","collision","registerClearReferenceSelectionEvent","clearFieldValue","preventDefault","self","fieldValueContener","fieldNameElement","fieldName","referenceModule","removeAttr","registerPreventingEnterSubmitEvent","currentElement","which","registerTimeFields","registerEventForClockPicker","Date","register","DateTime","referenceCreateHandler","_this4","formData","serializeFormData","inArray","Components","QuickCreate","createRecord","sourceRecordData","callbackFunction","_recordLabel","_recordId","noCache","registerReferenceCreate","controlElementDiv","addressFieldsMapping","addressFieldsMappingBlockID","LBL_ADDRESS_INFORMATION","LBL_ADDRESS_BILLING","LBL_ADDRESS_MAILING_INFORMATION","LBL_ADDRESS_SHIPPING","LBL_ADDRESS_DELIVERY_INFORMATION","addressFieldsData","registerEventForCopyAddress","block","addClass","registerEventForCopyBlockAddress","referenceFields","hideCopyAddressLabel","hasClass","to","copyAddress","enableCopyAddressFromModule","className","removeClass","recordRelativeAccountId","recordRelativeAccountName","copyAddressDetails","_this5","fromLabel","toLabel","relatedRecord","status","addressMapping","BlockIds","fromElement","fromElementLabel","nameElementFrom","nameElementTo","toElement","toElementLable","errorMsg","registerReferenceSelectionEvent","relategField","blockContainer","copyAddressDetailsRef","mapAddressDetails","err","indexOf","registerMaskFields","inputmask","registerSubmitEvent","editViewForm","recordPreSaveEvent","Event","isDefaultPrevented","removeData","formAlignmentAfterValidation","registerRecordPreSaveEventEvent","_this6","preSaveValidation","FormData","processData","contentType","_loop2","handlerElement","remove","submit","hoverField","focus","errorLog","registerLeavePageWithoutSubmit","CKEDITOR","instances","keys","initialFormData","serialize","onbeforeunload","stretchCKEditor","row","parents","td","parent","registerEventForEditor","_this7","loadEditorElement","noteContentElement","Text","Editor","registerHelpInfo","showPopoverElementView","registerBlockStatusCheckOnLoad","blocks","currentBlock","dynamicAttr","headerAnimationElement","not","bodyContents","blockId","cacheKey","cacheGet","checkVisibilityBlocks","registerAutoloadAddress","_index","search","input","requestData","_textStatus","_errorThrown","responseJSON","animation","_event","address","_idx","v","prop","idx","x","_renderItem","ul","concat","countryCode","setEnabledFields","fieldValue","fieldDisplay","placeholder","setDisabledFields","sourceFieldModule","registerValidationsFields","validationEngineOptionsForRecord","checkReferencesField","clear","activeProcess","activeSubProcess","CONFIG","fieldsReferencesDependent","t","referenceLink","processfieldElement","checkSubProcessModulesList","option","checkReferenceModulesList","referenceProcess","subProcessfieldElement","Vtiger_Helper_Js","hideOptions","subProcessValue","registerReferenceFields","registerFocusFirstField","afterTimeout","elementToFocus","elementToFocusTabindex","_this8","setTimeout","get","elemLen","selectionStart","selectionEnd","tabindex","registerCopyValue","registerMultiImageFields","MultiImage","registerInventoryController","Vtiger_Inventory_Js","getInventoryInstance","registerRecordCollectorModal","view","collectorType","html","modalForm","summary","validationEngineOptions","recordForm","dataset","column","setValue","hideModalWindow","modalId","registerAccountName","first","firstInput","last","lastInput","full","fullInput","legalForm","legalFormVal","keyup","triggerRecordEditEvents","changeValues","setFieldValue","changeOptions","options","setFieldOptions","showFields","hideFields","fieldInfo","display","_fieldElement$val","currentValues","map","filter","sort","newOptions","mandatory","add","includes","newValues","every","selected","validation","pageController","registerChangeValueHandlerEvent","_this9","fields","sendChangeValueHandlerEvent","_this10","progress","registerKeyboardShortcutsEvent","addEventListener","shiftKey","ctrlKey","code","registerBasicEvents","MultiEmail","MultiDependField","Tree","MultiCurrency","MeetingUrl","ChangesJson","MultiReference","Password","ActivityNotifier","MultiAttachment","registerEvents","registerBlockAnimationEvent"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAAC,SAAAA,kBAAAA,CAAAC,GAAA,CAAAC,CAAAA,OAAAA,kBAAA,CAAAD,GAAA,CAAAE,EAAAA,gBAAA,CAAAF,GAAA,CAAA,EAAAG,2BAAA,CAAAH,GAAA,GAAAI,kBAAA,EAAA,CAAA,SAAAA,kBAAA,EAAA,CAAA,MAAA,IAAAC,SAAA,CAAA,sIAAA,CAAA,CAAA,SAAAF,4BAAAG,CAAA,CAAAC,MAAA,CAAAD,CAAAA,GAAAA,CAAA,sBAAAA,CAAA,CAAA,OAAAE,iBAAA,CAAAF,CAAA,CAAAC,MAAA,CAAAE,CAAAA,IAAAA,CAAA,CAAAC,MAAA,CAAAC,SAAA,CAAAC,QAAA,CAAAC,IAAA,CAAAP,CAAA,CAAA,CAAAQ,KAAA,CAAAL,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,OAAAA,QAAAA,GAAAA,CAAA,EAAAH,CAAA,CAAAS,WAAA,GAAAN,CAAA,CAAAH,CAAA,CAAAS,WAAA,CAAAC,IAAA,CAAA,CAAA,KAAA,GAAAP,CAAA,EAAAA,KAAAA,GAAAA,CAAA,CAAAQ,KAAA,CAAAC,IAAA,CAAAZ,CAAA,CAAA,CAAA,WAAA,GAAAG,CAAA,EAAAU,0CAAAA,CAAAA,IAAA,CAAAV,CAAA,CAAA,CAAAD,iBAAA,CAAAF,CAAA,CAAAC,MAAA,CAAAL,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,SAAAA,gBAAAA,CAAAkB,IAAA,CAAAC,CAAAA,GAAAA,WAAAA,EAAAA,OAAAA,MA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