Skip to content

Commit

Permalink
[de] Add space to generated groupKey for radio buttons
Browse files Browse the repository at this point in the history
Also add method to generate new choice name by group key
  • Loading branch information
KirillovIlya committed Jul 19, 2024
1 parent 396792b commit 83ff453
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions word/Editor/StructuredDocumentTags/FormKeyGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@
return this.GetNewKey(form);

let checkBoxPr = form.GetCheckBoxPr();

let groupKey = checkBoxPr.GetGroupKey();
return this.GetNewChoiceByGroupKey(checkBoxPr.GetGroupKey());
};
CFormKeyGenerator.prototype.GetNewChoiceByGroupKey = function(groupKey)
{
let buttons = this.FormManager.GetRadioButtons(groupKey);
let choiceKeys = {};
for (let index = 0, count = buttons.length; index < count; ++index)
Expand Down Expand Up @@ -115,7 +117,7 @@
if (!form)
return "Form" + counter;
else if (form.IsRadioButton())
return "Group" + counter;
return "Group " + counter; // Добавил пробел, потому что в UI с пробелом генерится, чтобы не было разницы
else if (form.IsComplexForm())
return "Complex" + counter;
else if (form.IsTextForm())
Expand Down

0 comments on commit 83ff453

Please sign in to comment.