mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Fixed missing label for in assets view
This commit is contained in:
@@ -539,12 +539,15 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
addAttrBtn.addEventListener('click', () => {
|
||||
const row = document.createElement('tr');
|
||||
row.className = 'attribute-row mb-3';
|
||||
let randomId = crypto.randomUUID();
|
||||
row.innerHTML = `
|
||||
<td class="col-md-5 p-1">
|
||||
<input type="text" class="form-control" placeholder="@T["Attribute name"]" data-attr-name />
|
||||
<label for="updateName-${randomId}" class="visually-hidden">@T["Attribute name"]</label>
|
||||
<input id="updateName-${randomId}" type="text" class="form-control" placeholder="@T["Attribute name"]" data-attr-name />
|
||||
</td>
|
||||
<td class="col-md-5 p-1">
|
||||
<input type="text" class="form-control" placeholder="@T["Attribute value"]" data-attr-value />
|
||||
<label for="updateValue-${randomId}" class="visually-hidden">@T["Attribute value"]</label>
|
||||
<input id="updateValue-${randomId}" type="text" class="form-control" placeholder="@T["Attribute value"]" data-attr-value />
|
||||
</td>
|
||||
<td class="col-md-2 p-1">
|
||||
<button type="button" class="btn btn-danger btn-sm btn-remove-attribute">@T["Remove"]</button>
|
||||
@@ -593,13 +596,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
if (asset.Description.Attributes) {
|
||||
for (const [attrName, attrValue] of Object.entries(asset.Description.Attributes)) {
|
||||
const row = document.createElement('tr');
|
||||
let randomId = crypto.randomUUID();
|
||||
row.className = 'attribute-row mb-3';
|
||||
row.innerHTML = `
|
||||
<td class="col-md-5 p-1">
|
||||
<input type="text" class="form-control" value="${attrName}" placeholder="@T["Attribute name"]" data-attr-name />
|
||||
<label for="updateName-${randomId}" class="visually-hidden">@T["Attribute name"]</label>
|
||||
<input id="updateName-${randomId}" type="text" class="form-control" value="${attrName}" placeholder="@T["Attribute name"]" data-attr-name />
|
||||
</td>
|
||||
<td class="col-md-5 p-1">
|
||||
<input type="text" class="form-control" value="${attrValue}" placeholder="@T["Attribute value"]" data-attr-value />
|
||||
<label for="updateValue-${randomId}" class="visually-hidden">@T["Attribute value"]</label>
|
||||
<input id="updateValue-${randomId}" type="text" class="form-control" value="${attrValue}" placeholder="@T["Attribute value"]" data-attr-value />
|
||||
</td>
|
||||
<td class="col-md-2 p-1">
|
||||
<button type="button" class="btn btn-danger btn-sm btn-remove-attribute">@T["Remove"]</button>
|
||||
|
||||
Reference in New Issue
Block a user