Skip to content
Snippets Groups Projects
Commit 14d6d879 authored by Prasad's avatar Prasad
Browse files

Pulled: commit 9fc1a3f4aae5075fec119d3c1ab273837b7e2a9e

parent 5d84b288
No related branches found
No related tags found
No related merge requests found
......@@ -22,13 +22,16 @@ Vtiger_Detail_Js("Contacts_Detail_Js", {}, {
checkForPortalUser: function (form) {
var element = jQuery('[name="portal"]', form);
var response = element.is(':checked');
var primaryEmailField = jQuery('[data-name="email"]');
if(primaryEmailField.length > 0) var primaryEmailValue = primaryEmailField["0"].attributes["data-value"].value;
if (response) {
var primaryEmailField = jQuery('[data-name="email"]');
if (primaryEmailField.length == 0) {
app.helper.showErrorNotification({message: app.vtranslate('JS_PRIMARY_EMAIL_FIELD_DOES_NOT_EXISTS')});
return false;
}
var primaryEmailValue = primaryEmailField["0"].data("value");
if (primaryEmailValue == "") {
app.helper.showErrorNotification({message: app.vtranslate('JS_PLEASE_ENTER_PRIMARY_EMAIL_VALUE_TO_ENABLE_PORTAL_USER')});
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment