[SSE mobile] Fix Bug 53688

This commit is contained in:
SergeyEzhin 2021-11-15 23:18:09 +04:00
parent 05f2217ac5
commit e401cbc79e
3 changed files with 37 additions and 3 deletions

View file

@ -226,7 +226,8 @@
"unknownErrorText": "Unknown error.",
"uploadImageExtMessage": "Unknown image format.",
"uploadImageFileCountMessage": "No images uploaded.",
"uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB."
"uploadImageSizeMessage": "The image is too big. The maximum size is 25 MB.",
"textErrorPasswordIsNotCorrect": "The password you supplied is not correct.<br>Verify that the CAPS LOCK key is off and be sure to use the correct capitalization."
},
"LongActions": {
"applyChangesTextText": "Loading data...",
@ -262,7 +263,12 @@
"txtEditingMode": "Set editing mode...",
"uploadImageTextText": "Uploading image...",
"uploadImageTitleText": "Uploading Image",
"waitText": "Please, wait..."
"waitText": "Please, wait...",
"textErrorWrongPassword": "The password you supplied is not correct.",
"textUnlockRange": "Unlock Range",
"textUnlockRangeWarning": "A range you are trying to change is password protected.",
"advDRMPassword": "Password",
"textCancel": "Cancel"
},
"Statusbar": {
"notcriticalErrorTitle": "Warning",

View file

@ -311,6 +311,10 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
config.msg = _t.errorLoadingFont;
break;
case Asc.c_oAscError.ID.PasswordIsNotCorrect:
config.msg = t('Error.textErrorPasswordIsNotCorrect');
break;
default:
config.msg = _t.errorDefaultMessage.replace('%1', id);
break;

View file

@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
import IrregularStack from "../../../../common/mobile/utils/IrregularStack";
import { Device } from '../../../../common/mobile/utils/device';
const LongActionsController = () => {
const {t} = useTranslation();
@ -181,7 +182,9 @@ const LongActionsController = () => {
};
const onConfirmAction = (id, apiCallback) => {
const onConfirmAction = (id, apiCallback, data) => {
const api = Common.EditorApi.get();
if (id === Asc.c_oAscConfirm.ConfirmReplaceRange || id === Asc.c_oAscConfirm.ConfirmReplaceFormulaInTable) {
f7.dialog.create({
title: _t.notcriticalErrorTitle,
@ -208,6 +211,27 @@ const LongActionsController = () => {
}},
],
}).open();
} else if (id == Asc.c_oAscConfirm.ConfirmChangeProtectRange) {
f7.dialog.create({
title: t('LongActions.textUnlockRange'),
text: t('LongActions.textUnlockRangeWarning'),
content: Device.ios ?
'<div class="input-field"><input type="password" class="modal-text-input" name="modal-password" placeholder="' + _t.advDRMPassword + '" id="modal-password"></div>' : '<div class="input-field"><div class="inputs-list list inline-labels"><ul><li><div class="item-content item-input"><div class="item-inner"><div class="item-input-wrap"><input type="password" name="modal-password" id="modal-password" placeholder=' + _t.advDRMPassword + '></div></div></div></li></ul></div></div>',
buttons: [
{
text: t('LongActions.textOk'),
onClick: () => {
let password = document.getElementById('modal-password').value;
if(apiCallback) {
apiCallback(true ? api.asc_checkProtectedRangesPassword(password, data) : false, false);
}
}
},
{
text: t('LongActions.textCancel')
}
]
}).open();
}
};