setReadOnly locked
This commit is contained in:
@@ -26,14 +26,14 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
Espo.define('Views.Fields.AssignedUser', 'Views.Fields.UserWithAvatar', function (Dep) {
|
||||
Espo.define('views/fields/assigned-user', 'views/fields/user-with-avatar', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
init: function () {
|
||||
this.assignmentPermission = this.getAcl().get('assignmentPermission');
|
||||
if (this.assignmentPermission == 'no') {
|
||||
this.readOnly = true;
|
||||
this.setReadOnly(true);
|
||||
}
|
||||
Dep.prototype.init.call(this);
|
||||
},
|
||||
@@ -46,7 +46,7 @@ Espo.define('Views.Fields.AssignedUser', 'Views.Fields.UserWithAvatar', function
|
||||
|
||||
getSelectPrimaryFilterName: function () {
|
||||
return 'active';
|
||||
},
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -87,9 +87,12 @@ Espo.define('views/fields/base', 'view', function (Dep) {
|
||||
this.getCellElement().removeClass('has-error');
|
||||
},
|
||||
|
||||
setReadOnly: function () {
|
||||
setReadOnly: function (locked) {
|
||||
if (this.readOnlyLocked) return;
|
||||
this.readOnly = true;
|
||||
if (locked) {
|
||||
this.readOnlyLocked = true;
|
||||
}
|
||||
if (this.mode == 'edit') {
|
||||
this.setMode('detail');
|
||||
if (this.isRendered()) {
|
||||
|
||||
Reference in New Issue
Block a user