mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Fixed html element id collisions
This commit is contained in:
@@ -78,7 +78,7 @@
|
|||||||
<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" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<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>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">@T["Cancel"]</button>
|
<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 groupId = currentButton.getAttribute('data-group-id');
|
||||||
const groupName = currentButton.getAttribute('data-group-name');
|
const groupName = currentButton.getAttribute('data-group-name');
|
||||||
|
|
||||||
deleteModal.querySelector('#groupId').textContent = groupId;
|
deleteModal.querySelector('#deleteGroupId').textContent = groupId;
|
||||||
deleteModal.querySelector('#groupName').textContent = groupName;
|
deleteModal.querySelector('#deleteGroupName').textContent = groupName;
|
||||||
|
|
||||||
// Store the delete URL for later use
|
// Store the delete URL for later use
|
||||||
deleteModal.querySelector('#deleteForm').dataset.url = `/Groups/Delete?uid=${groupId}`;
|
deleteModal.querySelector('#deleteForm').dataset.url = `/Groups/Delete?uid=${groupId}`;
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const url = deleteForm.dataset.url;
|
const url = deleteForm.dataset.url;
|
||||||
const groupId = deleteModal.querySelector('#groupId').textContent;
|
const groupId = deleteModal.querySelector('#deleteGroupId').textContent;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
@@ -340,32 +340,32 @@
|
|||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-check mb-3">
|
<div class="form-check mb-3">
|
||||||
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanInventorize" id="canInventorize" />
|
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanInventorize" id="updateCanInventorize" />
|
||||||
<label class="form-check-label" for="canInventorize">@T["Can inventorize"]</label>
|
<label class="form-check-label" for="updateCanInventorize">@T["Can inventorize"]</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageAssets" id="canManageAssets" />
|
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageAssets" id="updateCanManageAssets" />
|
||||||
<label class="form-check-label" for="canManageAssets">@T["Can manage assets"]</label>
|
<label class="form-check-label" for="updateCanManageAssets">@T["Can manage assets"]</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-check mb-3">
|
<div class="form-check mb-3">
|
||||||
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageUsers" id="canManageUsers" />
|
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageUsers" id="updateCanManageUsers" />
|
||||||
<label class="form-check-label" for="canManageUsers">@T["Can manage users"]</label>
|
<label class="form-check-label" for="updateCanManageUsers">@T["Can manage users"]</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageGroups" id="canManageGroups" />
|
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageGroups" id="updateCanManageGroups" />
|
||||||
<label class="form-check-label" for="canManageGroups">@T["Can manage groups"]</label>
|
<label class="form-check-label" for="updateCanManageGroups">@T["Can manage groups"]</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-check mb-3">
|
<div class="form-check mb-3">
|
||||||
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageLocations" id="canManageLocations" />
|
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageLocations" id="updateCanManageLocations" />
|
||||||
<label class="form-check-label" for="canManageLocations">@T["Can manage locations"]</label>
|
<label class="form-check-label" for="updateCanManageLocations">@T["Can manage locations"]</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageSettings" id="canManageSettings" />
|
<input type="checkbox" class="form-check-input" name="Description.Permissions.CanManageSettings" id="updateCanManageSettings" />
|
||||||
<label class="form-check-label" for="canManageSettings">@T["Can manage settings"]</label>
|
<label class="form-check-label" for="updateCanManageSettings">@T["Can manage settings"]</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user