diff --git a/apps/common/main/lib/controller/Protection.js b/apps/common/main/lib/controller/Protection.js
index 8e155a19b4..919b7f6e1c 100644
--- a/apps/common/main/lib/controller/Protection.js
+++ b/apps/common/main/lib/controller/Protection.js
@@ -61,7 +61,8 @@ define([
this.addListeners({
'Common.Views.Protection': {
'protect:password': _.bind(this.onPasswordClick, this),
- 'protect:signature': _.bind(this.onSignatureClick, this)
+ 'protect:signature': _.bind(this.onSignatureClick, this),
+ 'protect:markAsFinal': _.bind(this.onMarkAsFinal, this),
}
});
},
@@ -132,6 +133,10 @@ define([
}
},
+ onMarkAsFinal: function(state) {
+ this.api && this.api.markAsFinal(state);
+ },
+
createToolbarPanel: function() {
return this.view.getPanel();
},
@@ -147,6 +152,7 @@ define([
accept();
})).then(function(){
me.onChangeProtectDocument();
+ me.view && me.view.btnMarkAsFinal && me.view.btnMarkAsFinal.toggle(me.api.isFinal(), true);
Common.NotificationCenter.on('protect:doclock', _.bind(me.onChangeProtectDocument, me));
});
},
diff --git a/apps/common/main/lib/view/Protection.js b/apps/common/main/lib/view/Protection.js
index 7a520c9b96..6c9838a25e 100644
--- a/apps/common/main/lib/view/Protection.js
+++ b/apps/common/main/lib/view/Protection.js
@@ -57,6 +57,7 @@ define([
'' +
'' +
'' +
+ '' +
'' +
'';
@@ -122,6 +123,7 @@ define([
this._state = {disabled: false, hasPassword: false, disabledPassword: false, invisibleSignDisabled: false};
+ const me = this;
var filter = Common.localStorage.getKeysFilter();
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
@@ -163,6 +165,20 @@ define([
this.btnsInvisibleSignature.push(this.btnSignature);
}
+ if(this.appConfig.isPDFForm) {
+ this.btnMarkAsFinal = new Common.UI.Button({
+ cls: 'btn-toolbar x-huge icon-top',
+ iconCls: 'toolbar__icon btn-ic-protect',
+ caption: this.txtMarkAsFinal,
+ enableToggle: true,
+ dataHint : '1',
+ dataHintDirection: 'bottom',
+ dataHintOffset: 'small'
+ });
+ this.btnMarkAsFinal.on('toggle', function (btn, state) {
+ me.fireEvent('protect:markAsFinal', [state]);
+ });
+ }
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
},
@@ -231,6 +247,7 @@ define([
this.btnAddPwd && this.btnAddPwd.render(this.$el.find('#slot-btn-add-password'));
this.btnPwd && this.btnPwd.render(this.$el.find('#slot-btn-change-password'));
this.btnSignature && this.btnSignature.render(this.$el.find('#slot-btn-signature'));
+ this.btnMarkAsFinal && this.btnMarkAsFinal.render(this.$el.find('#slot-btn-mark-as-final'));
}
return this.$el;
},
@@ -353,6 +370,7 @@ define([
},
txtEncrypt: 'Encrypt',
+ txtMarkAsFinal: 'Mark as final',
txtSignature: 'Signature',
hintAddPwd: 'Encrypt with password',
hintPwd: 'Change or delete password',
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index eb51fdcbae..90ebd80184 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -1051,6 +1051,7 @@
"Common.Views.Protection.txtChangePwd": "Change password",
"Common.Views.Protection.txtDeletePwd": "Delete password",
"Common.Views.Protection.txtEncrypt": "Encrypt",
+ "Common.Views.Protection.txtMarkAsFinal": "Mark as final",
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
"Common.Views.Protection.txtSignature": "Signature",
"Common.Views.Protection.txtSignatureLine": "Add signature line",
diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json
index 67f9340e04..8ca1e7dc04 100644
--- a/apps/pdfeditor/main/locale/en.json
+++ b/apps/pdfeditor/main/locale/en.json
@@ -823,6 +823,7 @@
"Common.Views.Protection.txtChangePwd": "Change password",
"Common.Views.Protection.txtDeletePwd": "Delete password",
"Common.Views.Protection.txtEncrypt": "Encrypt",
+ "Common.Views.Protection.txtMarkAsFinal": "Mark as final",
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
"Common.Views.Protection.txtSignature": "Signature",
"Common.Views.Protection.txtSignatureLine": "Add signature line",
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index 08c2a53bfe..96dfa7e415 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -1134,6 +1134,7 @@
"Common.Views.Protection.txtChangePwd": "Change password",
"Common.Views.Protection.txtDeletePwd": "Delete password",
"Common.Views.Protection.txtEncrypt": "Encrypt",
+ "Common.Views.Protection.txtMarkAsFinal": "Mark as final",
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
"Common.Views.Protection.txtSignature": "Signature",
"Common.Views.Protection.txtSignatureLine": "Add signature line",
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index dd9214cadb..72aab5945b 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -1072,6 +1072,7 @@
"Common.Views.Protection.txtChangePwd": "Change password",
"Common.Views.Protection.txtDeletePwd": "Delete password",
"Common.Views.Protection.txtEncrypt": "Encrypt",
+ "Common.Views.Protection.txtMarkAsFinal": "Mark as final",
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
"Common.Views.Protection.txtSignature": "Signature",
"Common.Views.Protection.txtSignatureLine": "Add signature line",