YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Contacts/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 *************************************************************************************/\n'use strict';\n\nVtiger_Edit_Js(\n\t'Contacts_Edit_Js',\n\t{},\n\t{\n\t\t/**\n\t\t * Function to check for Portal User\n\t\t */\n\t\tcheckForPortalUser: function (form) {\n\t\t\tvar element = jQuery('[name=\"portal\"]', form);\n\t\t\tvar response = element.is(':checked');\n\t\t\tvar primaryEmailField = jQuery('[name=\"email\"]');\n\t\t\tvar primaryEmailValue = primaryEmailField.val();\n\t\t\tif (response) {\n\t\t\t\tif (primaryEmailField.length == 0) {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS'),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (primaryEmailValue == '') {\n\t\t\t\t\tapp.showNotify({\n\t\t\t\t\t\ttext: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER'),\n\t\t\t\t\t\ttype: 'info'\n\t\t\t\t\t});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Function to register recordpresave event\n\t\t */\n\t\tregisterRecordPreSaveEvent: function (form) {\n\t\t\tvar thisInstance = this;\n\t\t\tif (typeof form === 'undefined') {\n\t\t\t\tform = this.getForm();\n\t\t\t}\n\n\t\t\tform.on(Vtiger_Edit_Js.recordPreSave, function (e, data) {\n\t\t\t\tvar result = thisInstance.checkForPortalUser(form);\n\t\t\t\tif (!result) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tregisterBasicEvents: function (container) {\n\t\t\tthis._super(container);\n\t\t\tthis.registerRecordPreSaveEvent(container);\n\t\t}\n\t}\n);\n"],"names":["Vtiger_Edit_Js","checkForPortalUser","form","element","jQuery","response","is","primaryEmailField","primaryEmailValue","val","length","app","showNotify","text","vtranslate","type","registerRecordPreSaveEvent","thisInstance","getForm","on","recordPreSave","e","result","preventDefault","registerBasicEvents","container","_super"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFACA,YAAY,CAEZA,cAAc,CACb,kBAAkB,CAClB,EAAE,CACF;AAED;AACA,KACEC,kBAAkB,CAAE,SAAAA,kBAAAA,CAAUC,IAAI,CAAE,CAAA,IAC/BC,OAAO,CAAGC,MAAM,CAAC,mBAAiB,CAAEF,IAAI,CAAC,CACzCG,QAAQ,CAAGF,OAAO,CAACG,EAAE,CAAC,UAAU,CAAC,CACjCC,iBAAiB,CAAGH,MAAM,CAAC,kBAAgB,CAAC,CAC5CI,iBAAiB,CAAGD,iBAAiB,CAACE,GAAG,EAAE,CAC/C,GAAIJ,QAAQ,CAAE,CACb,GAAgC,CAAC,EAA7BE,iBAAiB,CAACG,MAAW,CAKhC,OAJAC,GAAG,CAACC,UAAU,CAAC,CACdC,IAAI,CAAEF,GAAG,CAACG,UAAU,CAAC,wCAAwC,CAAC,CAC9DC,IAAI,CAAE,OACP,CAAC,CAAC,CAGH,CAAA,CAAA,CAAA,GAAyB,EAAE,EAAvBP,iBAAuB,CAK1B,OAJAG,GAAG,CAACC,UAAU,CAAC,CACdC,IAAI,CAAEF,GAAG,CAACG,UAAU,CAAC,2DAA2D,CAAC,CACjFC,IAAI,CAAE,MACP,CAAC,CAAC,CAGJ,CAAA,CAAA,CACA,OACD,CAAA,CAAA,CAAC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