@@ -482,7 +485,8 @@ document.addEventListener('DOMContentLoaded', () => {
updateAttributesContainer.innerHTML = '';
updateForm.reset();
-
+ const locationSelect = updateForm.querySelector('#updateLocationSelect');
+ await loadLocationsIntoSelect(locationSelect);
try {
const response = await fetch(`/Assets/Get?cn=${assetId}`);
const responseJson = await response.json();
@@ -754,6 +758,15 @@ document.addEventListener('DOMContentLoaded', () => {
});
});
});
+
+document.addEventListener('DOMContentLoaded', () => {
+ const createModal = document.getElementById('createAssetModal');
+ createModal.addEventListener('show.bs.modal', async () => {
+ const select = createModal.querySelector('#createLocationSelect');
+ await loadLocationsIntoSelect(select);
+ });
+});
+
\ No newline at end of file
diff --git a/src/Views/Shared/_Layout.cshtml b/src/Views/Shared/_Layout.cshtml
index 3ef20ce..0611bc7 100644
--- a/src/Views/Shared/_Layout.cshtml
+++ b/src/Views/Shared/_Layout.cshtml
@@ -17,6 +17,12 @@
+