mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added drop-down to user create and update modal
This commit is contained in:
@@ -203,7 +203,9 @@
|
|||||||
<h6 class="fw-bold">@T["Workplace & account"]</h6>
|
<h6 class="fw-bold">@T["Workplace & account"]</h6>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Workplace"]</label>
|
<label class="form-label">@T["Workplace"]</label>
|
||||||
<input type="text" id="updateWorkplace" name="Description.Workplace" class="form-control" />
|
<select class="form-select" id="updateWorkplace" name="Description.Workplace">
|
||||||
|
<option value="">@T["Select location"]</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Groups"]</label>
|
<label class="form-label">@T["Groups"]</label>
|
||||||
@@ -374,7 +376,9 @@
|
|||||||
updateForm.querySelector('#updateTitle').value = title || '';
|
updateForm.querySelector('#updateTitle').value = title || '';
|
||||||
updateForm.querySelector('#updateName').value = name || '';
|
updateForm.querySelector('#updateName').value = name || '';
|
||||||
updateForm.querySelector('#updateSurname').value = surname || '';
|
updateForm.querySelector('#updateSurname').value = surname || '';
|
||||||
updateForm.querySelector('#updateWorkplace').value = workplace || '';
|
let updateWorkplaceElement = updateForm.querySelector('#updateWorkplace');
|
||||||
|
await loadLocationsIntoSelect(updateWorkplaceElement);
|
||||||
|
updateWorkplaceElement.value = workplace || '';
|
||||||
updateForm.querySelector('#updatePassword').value = '';
|
updateForm.querySelector('#updatePassword').value = '';
|
||||||
updateForm.querySelector('#updateJpegPhoto').value = '';
|
updateForm.querySelector('#updateJpegPhoto').value = '';
|
||||||
|
|
||||||
@@ -484,7 +488,9 @@
|
|||||||
<h6 class="fw-bold">@T["Workplace & account"]</h6>
|
<h6 class="fw-bold">@T["Workplace & account"]</h6>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Workplace"]</label>
|
<label class="form-label">@T["Workplace"]</label>
|
||||||
<input type="text" name="Description.Workplace" class="form-control" />
|
<select class="form-select" name="Description.Workplace">
|
||||||
|
<option value="">@T["Select location"]</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<label class="form-label">@T["Groups"]</label>
|
<label class="form-label">@T["Groups"]</label>
|
||||||
@@ -526,6 +532,10 @@
|
|||||||
createModal.addEventListener('show.bs.modal', async () => {
|
createModal.addEventListener('show.bs.modal', async () => {
|
||||||
await populateGroupsDropdown(createGroupsSelect);
|
await populateGroupsDropdown(createGroupsSelect);
|
||||||
createForm.reset();
|
createForm.reset();
|
||||||
|
let createWorkplaceElement = createForm.querySelector('[name="Description.Workplace"]');
|
||||||
|
await loadLocationsIntoSelect(createWorkplaceElement);
|
||||||
|
createWorkplaceElement.value = '';
|
||||||
|
|
||||||
photoPreview.style.display = 'none';
|
photoPreview.style.display = 'none';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user