From 5a059744d2af02af6638b2d122027aac32eefff6 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 25 Jun 2020 14:13:08 +0300 Subject: [PATCH] [DE] Fix text field settings --- .../template/ControlSettingsDialog.template | 18 +++++++++--------- .../main/app/view/ControlSettingsDialog.js | 8 +++++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/apps/documenteditor/main/app/template/ControlSettingsDialog.template b/apps/documenteditor/main/app/template/ControlSettingsDialog.template index dd7a39238..278ead730 100644 --- a/apps/documenteditor/main/app/template/ControlSettingsDialog.template +++ b/apps/documenteditor/main/app/template/ControlSettingsDialog.template @@ -189,8 +189,13 @@ + + + @@ -203,13 +208,8 @@ - - -
- -
+
+
+
+
-
-
-
-
+ +
diff --git a/apps/documenteditor/main/app/view/ControlSettingsDialog.js b/apps/documenteditor/main/app/view/ControlSettingsDialog.js index e776693f9..15ba936c1 100644 --- a/apps/documenteditor/main/app/view/ControlSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ControlSettingsDialog.js @@ -335,9 +335,12 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', labelText: this.textComb }); this.chComb.on('change', _.bind(function(field, newValue, oldValue, eOpts){ - if (field.getValue()=='checked') { + var checked = (field.getValue()=='checked'); + if (checked) { this.chMaxChars.setValue(true); } + this.btnEditPlaceholder.setDisabled(!checked); + this.spnWidth.setDisabled(!checked); }, this)); this.afterRender(); @@ -510,6 +513,9 @@ define([ 'text!documenteditor/main/app/template/ControlSettingsDialog.template', val = formTextPr.get_Comb(); this.chComb.setValue(!!val, true); + this.btnEditPlaceholder.setDisabled(!val); + this.spnWidth.setDisabled(!val); + val = formTextPr.get_MaxCharacters(); this.chMaxChars.setValue(val && val>=0, true); this.spnMaxChars.setDisabled(!val || val<0);