fix email create contact
This commit is contained in:
@@ -99,15 +99,15 @@ class Email extends \Espo\Core\ORM\Repositories\RDB
|
||||
}
|
||||
}
|
||||
|
||||
$nameHash = array();
|
||||
$typeHash = array();
|
||||
$idHash = array();
|
||||
$nameHash = (object) [];
|
||||
$typeHash = (object) [];
|
||||
$idHash = (object) [];
|
||||
foreach ($addressList as $address) {
|
||||
$p = $this->getEntityManager()->getRepository('EmailAddress')->getEntityByAddress($address);
|
||||
if ($p) {
|
||||
$nameHash[$address] = $p->get('name');
|
||||
$typeHash[$address] = $p->getEntityName();
|
||||
$idHash[$address] = $p->id;
|
||||
$nameHash->$address = $p->get('name');
|
||||
$typeHash->$address = $p->getEntityName();
|
||||
$idHash->$address = $p->id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ Espo.define('views/email/fields/from-address-varchar', 'views/fields/varchar', f
|
||||
attributes.lastName = lastName;
|
||||
}
|
||||
|
||||
var viewName = this.getMetadata().get('clientDefs.' + scope + '.modalViews.edit') || 'Modals.Edit';
|
||||
var viewName = this.getMetadata().get('clientDefs.' + scope + '.modalViews.edit') || 'views/modals/edit';
|
||||
|
||||
this.createView('create', viewName, {
|
||||
scope: scope,
|
||||
@@ -185,12 +185,14 @@ Espo.define('views/email/fields/from-address-varchar', 'views/fields/varchar', f
|
||||
this.nameHash = nameHash;
|
||||
this.typeHash = typeHash;
|
||||
|
||||
var attributes = {
|
||||
nameHash: nameHash,
|
||||
idHash: idHash,
|
||||
typeHash: typeHash
|
||||
};
|
||||
|
||||
setTimeout(function () {
|
||||
this.model.set({
|
||||
nameHash: nameHash,
|
||||
idHash: idHash,
|
||||
typeHash: typeHash
|
||||
});
|
||||
this.model.set(attributes);
|
||||
}.bind(this), 50);
|
||||
}, this);
|
||||
}.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user