Fixed html element id collisions

This commit is contained in:
2025-11-28 17:06:40 +01:00
parent f8a4350fa0
commit 9d3e78b713

View File

@@ -78,7 +78,7 @@
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>@T["GroupDeleteConfirmation1"] <strong id="groupName"></strong> (ID: <span id="groupId"></span>)@T["GroupDeleteConfirmation2"]</p>
<p>@T["GroupDeleteConfirmation1"] <strong id="deleteGroupName"></strong> (ID: <span id="deleteGroupId"></span>)@T["GroupDeleteConfirmation2"]</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">@T["Cancel"]</button>
@@ -101,8 +101,8 @@
const groupId = currentButton.getAttribute('data-group-id');
const groupName = currentButton.getAttribute('data-group-name');
deleteModal.querySelector('#groupId').textContent = groupId;
deleteModal.querySelector('#groupName').textContent = groupName;
deleteModal.querySelector('#deleteGroupId').textContent = groupId;
deleteModal.querySelector('#deleteGroupName').textContent = groupName;
// Store the delete URL for later use
deleteModal.querySelector('#deleteForm').dataset.url = `/Groups/Delete?uid=${groupId}`;
@@ -114,7 +114,7 @@
e.preventDefault();
const url = deleteForm.dataset.url;
const groupId = deleteModal.querySelector('#groupId').textContent;
const groupId = deleteModal.querySelector('#deleteGroupId').textContent;
try {
const response = await fetch(url, {
@@ -340,32 +340,32 @@
<div class="col-md-4">
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanInventorize" id="canInventorize" />
<label class="form-check-label" for="canInventorize">@T["Can inventorize"]</label>
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanInventorize" id="updateCanInventorize" />
<label class="form-check-label" for="updateCanInventorize">@T["Can inventorize"]</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageAssets" id="canManageAssets" />
<label class="form-check-label" for="canManageAssets">@T["Can manage assets"]</label>
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageAssets" id="updateCanManageAssets" />
<label class="form-check-label" for="updateCanManageAssets">@T["Can manage assets"]</label>
</div>
</div>
<div class="col-md-4">
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageUsers" id="canManageUsers" />
<label class="form-check-label" for="canManageUsers">@T["Can manage users"]</label>
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageUsers" id="updateCanManageUsers" />
<label class="form-check-label" for="updateCanManageUsers">@T["Can manage users"]</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageGroups" id="canManageGroups" />
<label class="form-check-label" for="canManageGroups">@T["Can manage groups"]</label>
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageGroups" id="updateCanManageGroups" />
<label class="form-check-label" for="updateCanManageGroups">@T["Can manage groups"]</label>
</div>
</div>
<div class="col-md-4">
<div class="form-check mb-3">
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageLocations" id="canManageLocations" />
<label class="form-check-label" for="canManageLocations">@T["Can manage locations"]</label>
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageLocations" id="updateCanManageLocations" />
<label class="form-check-label" for="updateCanManageLocations">@T["Can manage locations"]</label>
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageSettings" id="canManageSettings" />
<label class="form-check-label" for="canManageSettings">@T["Can manage settings"]</label>
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageSettings" id="updateCanManageSettings" />
<label class="form-check-label" for="updateCanManageSettings">@T["Can manage settings"]</label>
</div>
</div>
</div>