Skip to content

Commit

Permalink
[pdf] Added locked forms warning
Browse files Browse the repository at this point in the history
  • Loading branch information
KhromovNikita committed Dec 16, 2024
1 parent cc3e1b2 commit 822c82a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps/pdfeditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ define([
this.api.asc_registerCallback('asc_onOpenFilePdfForm', _.bind(this.onOpenFilePdfForm, this));
this.api.asc_registerCallback('asc_onValidateErrorPdfForm', _.bind(this.onValidateErrorPdfForm, this));
this.api.asc_registerCallback('asc_onFormatErrorPdfForm', _.bind(this.onFormatErrorPdfForm, this));
this.api.asc_registerCallback('asc_onLockedPdfFormsError', _.bind(this.onLockedPdfFormsError, this));

Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Expand Down Expand Up @@ -2000,6 +2001,19 @@ define([
Common.UI.alert(config).$window.attr('data-value', id);
},

onLockedPdfFormsError: function(oInfo) {
var id = 'pdf-format-error',
config = {
closable: true,
title: this.notcriticalErrorTitle,
iconCls: 'warn',
buttons: ['ok']
};

config.msg = Common.Utils.String.format(this.txtLockedFormsError);
Common.UI.alert(config).$window.attr('data-value', id);
},

onCoAuthoringDisconnect: function() {
this.getApplication().getController('Viewport').getView('Viewport').setMode({isDisconnected:true});
appHeader.setCanRename(false);
Expand Down
1 change: 1 addition & 0 deletions apps/pdfeditor/main/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@
"PDFE.Controllers.Main.txtInvalidGreaterLess": "Ivalid value for field \"{0}\": must be greater than or equal to {1} and less then or equal to {2}.",
"PDFE.Controllers.Main.txtInvalidLess": "Ivalid value for field \"{0}\": must be less than or equal to {1}.",
"PDFE.Controllers.Main.txtInvalidPdfFormat": "The value entered does not match the format of the field \"{0}\".",
"PDFE.Controllers.Main.txtLockedFormsError": "The action cannot be performed as it causes changes to locked forms.",
"PDFE.Controllers.Main.txtNeedSynchronize": "You have updates",
"PDFE.Controllers.Main.txtSaveCopyAsComplete": "The file copy was successfully saved",
"PDFE.Controllers.Main.txtSecurityWarningLink": "This document is trying to connect to {0}.<br>If you trust this site, press \"OK\" while holding down the ctrl key.",
Expand Down

0 comments on commit 822c82a

Please sign in to comment.