From 74d9fb121a171313ff673a026271f9b45d05b015 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 30 Oct 2020 22:19:10 +0300 Subject: [PATCH] [DE] Form settings: disable comb of chars when chars limit is disabled --- apps/documenteditor/main/app/view/FormSettings.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index df0f84541..01457f003 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -355,11 +355,16 @@ define([ }, onChMaxCharsChanged: function(field, newValue, oldValue, eOpts){ - this.spnMaxChars.setDisabled(field.getValue()!='checked'); + var checked = (field.getValue()=='checked'); + this.spnMaxChars.setDisabled(!checked); + if (!checked) { + this.chComb.setValue(false, true); + this.spnWidth.setDisabled(true); + } if (this.api && !this._noApply) { var props = this._originalProps || new AscCommon.CContentControlPr(); var formTextPr = this._originalTextFormProps || new AscCommon.CSdtTextFormPr(); - var checked = (field.getValue()=='checked' || this.chComb.getValue()=='checked'); + (!checked) && formTextPr.put_Comb(checked); formTextPr.put_MaxCharacters(checked ? (this.spnMaxChars.getNumberValue() || 10) : checked); props.put_TextFormPr(formTextPr); this.api.asc_SetContentControlProperties(props, this.internalId);