mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Merge pull request #218 from LD-Reborn/193-feature-users-create-and-edit-add-location-drop-down
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>
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<label class="form-label">@T["Groups"]</label>
|
||||
@@ -374,7 +376,9 @@
|
||||
updateForm.querySelector('#updateTitle').value = title || '';
|
||||
updateForm.querySelector('#updateName').value = name || '';
|
||||
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('#updateJpegPhoto').value = '';
|
||||
|
||||
@@ -484,7 +488,9 @@
|
||||
<h6 class="fw-bold">@T["Workplace & account"]</h6>
|
||||
<div class="col-md-6">
|
||||
<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 class="col-md-6">
|
||||
<label class="form-label">@T["Groups"]</label>
|
||||
@@ -526,6 +532,10 @@
|
||||
createModal.addEventListener('show.bs.modal', async () => {
|
||||
await populateGroupsDropdown(createGroupsSelect);
|
||||
createForm.reset();
|
||||
let createWorkplaceElement = createForm.querySelector('[name="Description.Workplace"]');
|
||||
await loadLocationsIntoSelect(createWorkplaceElement);
|
||||
createWorkplaceElement.value = '';
|
||||
|
||||
photoPreview.style.display = 'none';
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user