[de] Fix setting checkBox properties using jsApi

This commit is contained in:
Ilya Kirillov
2025-11-27 21:30:16 +03:00
parent 4c69fb7196
commit 7b5cc28ee6
2 changed files with 9 additions and 2 deletions

View File

@ -413,10 +413,10 @@
if (form.IsTextForm() && form.GetTextFormPr().IsComb())
combMax = form.GetTextFormPr().GetMaxCharacters();
if (!form.IsMainForm())
if (!form.IsMainForm() && form.GetMainForm() && !form.GetMainForm().IsLabeledCheckBox())
form = form.GetMainForm();
if (form.IsFormRequired() && form.CheckOFormUserMaster() && this.logicDocument.IsHighlightRequiredFields() && !this.Graphics.isPrintMode)
if (form.IsFormRequired() && !form.IsLabeledCheckBox() && form.CheckOFormUserMaster() && this.logicDocument.IsHighlightRequiredFields() && !this.Graphics.isPrintMode)
formBorder = this.logicDocument.GetRequiredFieldsBorder();
else if (form.GetFormPr().GetBorder())
formBorder = form.GetFormPr().GetBorder();

View File

@ -24648,9 +24648,16 @@
return executeNoFormLockCheck(function() {
let mainForm = this.Sdt.GetMainForm();
if (mainForm && mainForm !== this.Sdt && mainForm.IsLabeledCheckBox())
{
mainForm.SetCheckBoxLabel(label);
}
else
{
this.Sdt.SetCheckBoxLabel(label);
let innerCheckBox = this.Sdt.IsLabeledCheckBox() ? this.Sdt.GetInnerCheckBox() : null;
if (innerCheckBox)
this.Sdt = innerCheckBox;
}
return true;
}, this);