From b8a36e8f6d72f5fc82cd343a3ba0edd3ceda35cf Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 19 Feb 2021 12:07:55 +0300 Subject: [PATCH] Fix Bug 48723 --- apps/common/main/lib/view/SignDialog.js | 13 ++++++++++--- apps/documenteditor/main/locale/en.json | 1 + apps/documenteditor/main/locale/ru.json | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/view/SignDialog.js b/apps/common/main/lib/view/SignDialog.js index 44524278a..9789ab203 100644 --- a/apps/common/main/lib/view/SignDialog.js +++ b/apps/common/main/lib/view/SignDialog.js @@ -301,8 +301,14 @@ define([ _handleInput: function(state) { if (this.options.handler) { - if (state == 'ok' && (this.btnOk.isDisabled() || this.signObject && !this.signObject.isValid())) - return; + if (state == 'ok' && (this.btnOk.isDisabled() || this.signObject && !this.signObject.isValid())) { + if (!this.btnOk.isDisabled()) { + this.inputName.showError([this.textNameError]); + this.inputName.focus(); + } + return; + } + this.options.handler.call(this, this, state); } @@ -347,7 +353,8 @@ define([ tipFontSize: 'Font Size', textBold: 'Bold', textItalic: 'Italic', - textSelect: 'Select' + textSelect: 'Select', + textNameError: 'Signer name must not be empty.' }, Common.Views.SignDialog || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index f9af7c742..ca83e323f 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -367,6 +367,7 @@ "Common.Views.SignDialog.textCertificate": "Certificate", "Common.Views.SignDialog.textChange": "Change", "Common.Views.SignDialog.textInputName": "Input signer name", + "Common.Views.SignDialog.textNameError": "Signer name must not be empty.", "Common.Views.SignDialog.textItalic": "Italic", "Common.Views.SignDialog.textPurpose": "Purpose for signing this document", "Common.Views.SignDialog.textSelect": "Select", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index c498d9d99..95fc78679 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -367,6 +367,7 @@ "Common.Views.SignDialog.textCertificate": "Сертификат", "Common.Views.SignDialog.textChange": "Изменить", "Common.Views.SignDialog.textInputName": "Введите имя подписывающего", + "Common.Views.SignDialog.textNameError": "Имя подписывающего не должно быть пустым.", "Common.Views.SignDialog.textItalic": "Курсив", "Common.Views.SignDialog.textPurpose": "Цель подписания документа", "Common.Views.SignDialog.textSelect": "Выбрать",