[DE mobile] Fix Bug 59970

This commit is contained in:
SergeyEzhin 2022-12-07 17:01:35 +04:00
parent 20a949da7e
commit 779b03d68a
2 changed files with 15 additions and 0 deletions

View file

@ -476,6 +476,8 @@
"errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
"leavePageText": "You have unsaved changes. Click 'Stay on this Page' to wait for autosave. Click 'Leave this Page' to discard all the unsaved changes.",
"notcriticalErrorTitle": "Warning",
"textDocumentProtected": "The document is protected. Edit settings are not available",
"textOk": "Ok",
"SDK": {
" -Section ": " -Section ",
"above": "above",

View file

@ -790,6 +790,7 @@ class MainController extends Component {
}
onChangeProtectDocument() {
const { t } = this.props;
const storeAppOptions = this.props.storeAppOptions;
const props = this.getDocProps(true);
const isProtected = props && (props.isReadOnly || props.isCommentsOnly || props.isFormsOnly || props.isReviewOnly);
@ -797,6 +798,18 @@ class MainController extends Component {
storeAppOptions.setProtection(isProtected);
props && this.applyRestrictions(props.type);
Common.Notifications.trigger('protect:doclock', props);
if(isProtected) {
f7.dialog.create({
title: t('Main.notcriticalErrorTitle'),
text: t('Main.textDocumentProtected'),
buttons: [
{
text: t('Main.textOk')
}
]
}).open();
}
}
applyRestrictions(type) {