Created
August 18, 2023 18:27
-
-
Save aclips/36ff4e561b881850b995eaac77f7ce9d to your computer and use it in GitHub Desktop.
Запрет на изменение полей в профиле пользователя Bitrix24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let codes = [ | |
'NAME', | |
'LAST_NAME', | |
'SECOND_NAME' | |
] | |
BX.addCustomEvent('BX.UI.EntityConfigurationManager:onInitialize', (e) => { | |
let id = e.getId() | |
if (codes.indexOf(id) >= 0) { | |
if (e._schemeElement) { | |
let scheme = e._schemeElement | |
scheme._isEditable = false | |
if (scheme._settings) { | |
let settings = scheme._settings | |
settings.editable = false | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment