From 90dbdd6e219c814c6f3e5f194d67faa21bab10db Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 16 Dec 2022 16:15:22 +0300 Subject: [PATCH] [DE] Check password length (fix for Safari - paste saved passwords) --- apps/documenteditor/main/app/view/ProtectDialog.js | 8 ++++++-- apps/documenteditor/main/locale/en.json | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/view/ProtectDialog.js b/apps/documenteditor/main/app/view/ProtectDialog.js index 50481ae81..f314063ac 100644 --- a/apps/documenteditor/main/app/view/ProtectDialog.js +++ b/apps/documenteditor/main/app/view/ProtectDialog.js @@ -114,7 +114,10 @@ define([ maxLength: 15, validateOnBlur: false, repeatInput: this.repeatPwd, - showPwdOnClick: true + showPwdOnClick: true, + validation : function(value) { + return (value.length>15) ? me.txtLimit : true; + } }); this.rbView = new Common.UI.RadioBox({ @@ -230,7 +233,8 @@ define([ textView: 'No changes (Read only)', textForms: 'Filling forms', textReview: 'Tracked changes', - textComments: 'Comments' + textComments: 'Comments', + txtLimit: 'Password is limited to 15 characters' }, DE.Views.ProtectDialog || {})); }); diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 6894860a1..e25ab48d5 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2644,6 +2644,7 @@ "DE.Views.ProtectDialog.txtRepeat": "Repeat password", "DE.Views.ProtectDialog.txtTitle": "Protect", "DE.Views.ProtectDialog.txtWarning": "Warning: If you lose or forget the password, it cannot be recovered. Please keep it in a safe place.", + "DE.Views.ProtectDialog.txtLimit": "Password is limited to 15 characters", "DE.Views.RightMenu.txtChartSettings": "Chart settings", "DE.Views.RightMenu.txtFormSettings": "Form Settings", "DE.Views.RightMenu.txtHeaderFooterSettings": "Header and footer settings",