fixes
This commit is contained in:
@@ -39,6 +39,8 @@ class ActionHistoryRecord extends Record
|
||||
|
||||
protected $listCountQueryDisabled = true;
|
||||
|
||||
protected $forceSelectAllAttributes = true;
|
||||
|
||||
public function loadParentNameFields(\Espo\ORM\Entity $entity)
|
||||
{
|
||||
if ($entity->get('targetId') && $entity->get('targetType')) {
|
||||
|
||||
@@ -39,6 +39,8 @@ class AuthLogRecord extends Record
|
||||
|
||||
protected $actionHistoryDisabled = true;
|
||||
|
||||
protected $forceSelectAllAttributes = true;
|
||||
|
||||
protected $readOnlyAttributeList = [
|
||||
"username",
|
||||
"portalId",
|
||||
|
||||
@@ -39,6 +39,8 @@ class PortalRole extends Record
|
||||
$this->addDependency('fileManager');
|
||||
}
|
||||
|
||||
protected $forceSelectAllAttributes = true;
|
||||
|
||||
public function afterCreate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
|
||||
@@ -39,6 +39,8 @@ class Role extends Record
|
||||
$this->addDependency('fileManager');
|
||||
}
|
||||
|
||||
protected $forceSelectAllAttributes = true;
|
||||
|
||||
public function afterCreate(Entity $entity, array $data = array())
|
||||
{
|
||||
parent::afterCreate($entity, $data);
|
||||
|
||||
@@ -63,6 +63,13 @@ class User extends Record
|
||||
'accountsIds'
|
||||
];
|
||||
|
||||
protected $mandatorySelectAttributeList = [
|
||||
'isPortalUser',
|
||||
'isActive',
|
||||
'userName',
|
||||
'isAdmin'
|
||||
];
|
||||
|
||||
protected $linkSelectParams = array(
|
||||
'targetLists' => array(
|
||||
'additionalColumns' => array(
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
|
||||
{{#if isNotEmpty}}
|
||||
{{{value}}}
|
||||
{{else}}
|
||||
{{#if valueIsSet}}{{translate 'None'}}{{else}}...{{/if}}{{/if}}
|
||||
|
||||
@@ -36,7 +36,15 @@ Espo.define('views/fields/json-object', 'views/fields/base', function (Dep) {
|
||||
|
||||
detailTemplate: 'fields/json-object/detail',
|
||||
|
||||
data: function () {
|
||||
var data = Dep.prototype.data.call(this);
|
||||
data.valueIsSet = this.model.has(this.name);
|
||||
data.isNotEmpty = !!this.model.get(this.name);
|
||||
return data;
|
||||
},
|
||||
|
||||
getValueForDisplay: function () {
|
||||
if (!this.model.get(this.name)) return null;
|
||||
var text = JSON.stringify(this.model.get(this.name), false, 2).replace(/(\r\n|\n|\r)/gm, '<br>').replace(/\s/g, ' ');
|
||||
|
||||
return text;
|
||||
|
||||
Reference in New Issue
Block a user