mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Merge pull request #261 from LD-Reborn/251-bug-inventory-asset-edit-view-accessibility-issues
251 bug inventory asset edit view accessibility issues
This commit is contained in:
@@ -34,8 +34,8 @@
|
|||||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header bg-info text-white">
|
<div class="modal-header bg-info text-white">
|
||||||
<h5 class="modal-title" id="viewAssetModalLabel">@T["Asset Details"]</h5>
|
<h5 class="modal-title text-dark" id="viewAssetModalLabel">@T["Asset Details"]</h5>
|
||||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close btn-close-white" style="filter: invert(0);" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
@@ -143,36 +143,36 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Name"]</label>
|
<label class="form-label" for="detailName">@T["Name"]</label>
|
||||||
<input type="text" class="form-control" name="Name" value="${asset.Name || ''}" disabled />
|
<input type="text" class="form-control" id="detailName" name="Name" value="${asset.Name || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Location"]</label>
|
<label class="form-label" for="detailLocation">@T["Location"]</label>
|
||||||
<input type="text" class="form-control" name="Location" value="${asset.Location || ''}" disabled />
|
<input type="text" class="form-control" id="detailLocation" name="Location" value="${asset.Location || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Owner"]</label>
|
<label class="form-label" for="detailOwner">@T["Owner"]</label>
|
||||||
<input type="text" class="form-control" name="Owner" value="${asset.Owner || ''}" disabled />
|
<input type="text" class="form-control" id="detailOwner" name="Owner" value="${asset.Owner || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Serial Number"]</label>
|
<label class="form-label" for="detailSerialNumber">@T["Serial Number"]</label>
|
||||||
<input type="text" class="form-control" name="SerialNumber" value="${asset.SerialNumber || ''}" disabled />
|
<input type="text" class="form-control" id="detailSerialNumber" name="SerialNumber" value="${asset.SerialNumber || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr class="my-3" />
|
<hr class="my-3" />
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<h6 class="fw-bold">@T["Description"]</h6>
|
<h6 class="fw-bold">@T["Description"]</h6>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Type"]</label>
|
<label class="form-label" for="detailType">@T["Type"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Type" value="${asset.Description?.Type || ''}" disabled />
|
<input type="text" class="form-control" id="detailType" name="Description.Type" value="${asset.Description?.Type || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Make"]</label>
|
<label class="form-label" for="detailMake">@T["Make"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Make" value="${asset.Description?.Make || ''}" disabled />
|
<input type="text" class="form-control" id="detailMake" name="Description.Make" value="${asset.Description?.Make || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Model"]</label>
|
<label class="form-label" for="detailModel">@T["Model"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Model" value="${asset.Description?.Model || ''}" disabled />
|
<input type="text" class="form-control" id="detailModel" name="Description.Model" value="${asset.Description?.Model || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
${asset.Description?.Attributes ? `
|
${asset.Description?.Attributes ? `
|
||||||
@@ -182,8 +182,8 @@
|
|||||||
${Object.entries(asset.Description.Attributes)
|
${Object.entries(asset.Description.Attributes)
|
||||||
.map(([k,v]) => `
|
.map(([k,v]) => `
|
||||||
<div class="d-flex gap-2 align-items-center attribute-row">
|
<div class="d-flex gap-2 align-items-center attribute-row">
|
||||||
<input type="text" class="form-control w-50" placeholder="@T["Attribute name"]" data-attr-name disabled value="${k}" />:
|
<input type="text" class="form-control w-50" placeholder="@T["Attribute name"]" aria-label="@T["Attribute name"]" data-attr-name disabled value="${k}" />:
|
||||||
<input type="text" class="form-control" placeholder="@T["Attribute value"]" data-attr-value disabled value="${v}" />
|
<input type="text" class="form-control" placeholder="@T["Attribute value"]" aria-label="@T["Attribute value"]" data-attr-value disabled value="${v}" />
|
||||||
</div>`)
|
</div>`)
|
||||||
.join('')}
|
.join('')}
|
||||||
</div>` : ''}
|
</div>` : ''}
|
||||||
@@ -193,20 +193,20 @@
|
|||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<h6 class="fw-bold">@T["Purchase Information"]</h6>
|
<h6 class="fw-bold">@T["Purchase Information"]</h6>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchase Date"]</label>
|
<label class="form-label" for="detailPurchaseDate">@T["Purchase Date"]</label>
|
||||||
<input type="date" class="form-control" name="Description.Purchase.PurchaseDate" value="${asset.Description.Purchase.PurchaseDate || ''}" disabled />
|
<input type="date" class="form-control" id="detailPurchaseDate" name="Description.Purchase.PurchaseDate" value="${asset.Description.Purchase.PurchaseDate || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchase Value"]</label>
|
<label class="form-label" for="detailPurchaseValue">@T["Purchase Value"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Purchase.PurchaseValue" value="${asset.Description.Purchase.PurchaseValue || ''}" disabled />
|
<input type="text" class="form-control" id="detailPurchaseValue" name="Description.Purchase.PurchaseValue" value="${asset.Description.Purchase.PurchaseValue || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchased At"]</label>
|
<label class="form-label" for="detailPurchaseAt">@T["Purchased At"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Purchase.PurchaseAt" value="${asset.Description.Purchase.PurchaseAt || ''}" disabled />
|
<input type="text" class="form-control" id="detailPurchaseAt" name="Description.Purchase.PurchaseAt" value="${asset.Description.Purchase.PurchaseAt || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchased By"]</label>
|
<label class="form-label" for="detailPurchaseBy">@T["Purchased By"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Purchase.PurchaseBy" value="${asset.Description.Purchase.PurchaseBy || ''}" disabled />
|
<input type="text" class="form-control" id="detailPurchaseBy" name="Description.Purchase.PurchaseBy" value="${asset.Description.Purchase.PurchaseBy || ''}" disabled />
|
||||||
</div>
|
</div>
|
||||||
</div>` : ''}
|
</div>` : ''}
|
||||||
</div>`;
|
</div>`;
|
||||||
@@ -338,7 +338,7 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header bg-warning text-dark">
|
<div class="modal-header bg-warning text-dark">
|
||||||
<h5 class="modal-title" id="updateAssetModalLabel">@T["Update Asset"]</h5>
|
<h5 class="modal-title" id="updateAssetModalLabel">@T["Update Asset"]</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal" style="filter: invert(0);" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="updateAssetForm">
|
<form id="updateAssetForm">
|
||||||
@@ -346,42 +346,42 @@
|
|||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<!-- Same fields as in Create -->
|
<!-- Same fields as in Create -->
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Name"]</label>
|
<label class="form-label" for="updateName">@T["Name"]</label>
|
||||||
<input type="text" class="form-control" name="Name" />
|
<input type="text" id="updateName" class="form-control" name="Name" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Location"]</label>
|
<label class="form-label" for="updateLocationSelect">@T["Location"]</label>
|
||||||
<select class="form-select" name="Location" id="updateLocationSelect">
|
<select class="form-select" name="Location" aria-label="@T["Location"]" id="updateLocationSelect">
|
||||||
<option value="">@T["Select location"]</option>
|
<option value="">@T["Select location"]</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Owner"]</label>
|
<label class="form-label" for="updateUsersSelect">@T["Owner"]</label>
|
||||||
<select class="form-select" name="Owner" id="updateUsersSelect">
|
<select class="form-select" name="Owner" aria-label="@T["Owner"]" id="updateUsersSelect">
|
||||||
<option value="">@T["Select owner"]</option>
|
<option value="">@T["Select owner"]</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Serial Number"]</label>
|
<label class="form-label" for="updateSerialNumber">@T["Serial Number"]</label>
|
||||||
<input type="text" class="form-control" name="SerialNumber" />
|
<input type="text" class="form-control" id="updateSerialNumber" name="SerialNumber" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="my-3" />
|
<hr class="my-3" />
|
||||||
|
|
||||||
<h6 class="fw-bold">@T["Description"]</h6>
|
<h6 class="fw-bold">@T["Description"]</h6>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Type"]</label>
|
<label class="form-label" for="updateType">@T["Type"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Type" />
|
<input type="text" class="form-control" id="updateType" name="Description.Type" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Make"]</label>
|
<label class="form-label" for="updateMake">@T["Make"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Make" />
|
<input type="text" class="form-control" id="updateMake" name="Description.Make" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Model"]</label>
|
<label class="form-label" for="updateModel">@T["Model"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Model" />
|
<input type="text" class="form-control" id="updateModel" name="Description.Model" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 mt-3">
|
<div class="col-12 mt-3">
|
||||||
@@ -398,20 +398,20 @@
|
|||||||
|
|
||||||
<h6 class="fw-bold">@T["Purchase Information"]</h6>
|
<h6 class="fw-bold">@T["Purchase Information"]</h6>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchase Date"]</label>
|
<label class="form-label" for="updatePurchaseDate">@T["Purchase Date"]</label>
|
||||||
<input type="date" class="form-control" name="Description.Purchase.PurchaseDate" />
|
<input type="date" class="form-control" id="updatePurchaseDate" name="Description.Purchase.PurchaseDate" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchase Value"]</label>
|
<label class="form-label" for="updatePurchaseValue">@T["Purchase Value"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Purchase.PurchaseValue" />
|
<input type="text" class="form-control" id="updatePurchaseValue" name="Description.Purchase.PurchaseValue" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchased At"]</label>
|
<label class="form-label" for="updatePurchaseAt">@T["Purchased At"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Purchase.PurchaseAt" />
|
<input type="text" class="form-control" id="updatePurchaseAt" name="Description.Purchase.PurchaseAt" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Purchased By"]</label>
|
<label class="form-label" for="updatePurchaseBy">@T["Purchased By"]</label>
|
||||||
<input type="text" class="form-control" name="Description.Purchase.PurchaseBy" />
|
<input type="text" class="form-control" id="updatePurchaseBy" name="Description.Purchase.PurchaseBy" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -438,8 +438,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const row = document.createElement('div');
|
const row = document.createElement('div');
|
||||||
row.className = 'd-flex gap-2 align-items-center attribute-row';
|
row.className = 'd-flex gap-2 align-items-center attribute-row';
|
||||||
row.innerHTML = `
|
row.innerHTML = `
|
||||||
<input type="text" class="form-control" placeholder="@T["Attribute name"]" data-attr-name />
|
<input type="text" class="form-control" aria-label="@T["Attribute name"]" placeholder="@T["Attribute name"]" data-attr-name />
|
||||||
<input type="text" class="form-control" placeholder="@T["Attribute value"]" data-attr-value />
|
<input type="text" class="form-control" aria-label="@T["Attribute value"]" placeholder="@T["Attribute value"]" data-attr-value />
|
||||||
<button type="button" class="btn btn-danger btn-sm btn-remove-attribute">@T["Remove"]</button>
|
<button type="button" class="btn btn-danger btn-sm btn-remove-attribute">@T["Remove"]</button>
|
||||||
`;
|
`;
|
||||||
updateAttributesContainer.appendChild(row);
|
updateAttributesContainer.appendChild(row);
|
||||||
@@ -489,8 +489,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const row = document.createElement('div');
|
const row = document.createElement('div');
|
||||||
row.className = 'd-flex gap-2 align-items-center attribute-row';
|
row.className = 'd-flex gap-2 align-items-center attribute-row';
|
||||||
row.innerHTML = `
|
row.innerHTML = `
|
||||||
<input type="text" class="form-control" value="${attrName}" data-attr-name />
|
<input type="text" class="form-control" aria-label="@T["Attribute name"]" value="${attrName}" data-attr-name />
|
||||||
<input type="text" class="form-control" value="${attrValue}" data-attr-value />
|
<input type="text" class="form-control" aria-label="@T["Attribute value"]" value="${attrValue}" data-attr-value />
|
||||||
<button type="button" class="btn btn-danger btn-sm btn-remove-attribute">@T["Remove"]</button>
|
<button type="button" class="btn btn-danger btn-sm btn-remove-attribute">@T["Remove"]</button>
|
||||||
`;
|
`;
|
||||||
updateAttributesContainer.appendChild(row);
|
updateAttributesContainer.appendChild(row);
|
||||||
|
|||||||
Reference in New Issue
Block a user