mirror of
https://gitlab.com/comenius-institut/foerbico/metadata-form.git
synced 2025-12-07 23:34:31 +00:00
fixed name of independent radio groups
This commit is contained in:
parent
b0097a8d14
commit
ded168d805
1 changed files with 4 additions and 2 deletions
|
|
@ -441,15 +441,17 @@
|
|||
$.each(vocabInstitutions, function (i, item) {
|
||||
institutionOptions += '<option value="' + item["ror"] + '"' + (item["ror"] === institution ? ' selected' : '') + '>' + item["label"] + '</option>';
|
||||
});
|
||||
let radioGroupName = creatorList.childElementCount > 1 ? $(creatorList.lastElementChild.previousElementSibling).find('.inputType').find('input').attr('name') : ''
|
||||
radioGroupName += 'x'
|
||||
|
||||
item.innerHTML = `
|
||||
<div class="form-row">
|
||||
<div class="btn-group btn-group-toggle inputType" role="group" data-toggle="buttons">
|
||||
<label class="btn btn-outline-primary ${type === "Person" ? "active" : ""}" onclick="changeCreatorType(this.parentNode.parentNode.parentNode, 'Person')">
|
||||
<input type="radio" name="options" ${type === "Person" ? "checked" : ""} value="Person"><span data-i18n="LABEL_PERSON">Person</span>
|
||||
<input type="radio" name="${radioGroupName}" ${type === "Person" ? "checked" : ""} value="Person"><span data-i18n="LABEL_PERSON">Person</span>
|
||||
</label>
|
||||
<label class="btn btn-outline-primary ${type === "Organization" ? "active" : ""}" onclick="changeCreatorType(this.parentNode.parentNode.parentNode, 'Organization')">
|
||||
<input type="radio" name="options" ${type === "Organization" ? "checked" : ""} value="Organization"><span data-i18n="LABEL_ORGANIZATION">Organisation</span>
|
||||
<input type="radio" name="${radioGroupName}" ${type === "Organization" ? "checked" : ""} value="Organization"><span data-i18n="LABEL_ORGANIZATION">Organisation</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue