Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix backend modal loading

Benjamin Bädorfafecbb01f3e5
diff --git a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.html b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.html
index 1589434941d..0841ea9e823 100644
--- a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.html
+++ b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.html
@@ -1,5 +1,4 @@
<div
class="spot-modal dynamic-content-modal--wrapper loading-indicator--location"
- #wrapper
data-indicator-name="modal"
></div>
diff --git a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.ts b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.ts
index 78b96d67f16..7bb88f430eb 100644
--- a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.ts
+++ b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.ts
@@ -45,8 +45,6 @@ export class DynamicContentModalComponent extends OpModalComponent implements On
// the modal when removing error messages or clicking on labels e.g. in the registration modal.
public closeOnOutsideClick = false;
- @ViewChild('wrapper') wrapper:HTMLElement;
-
constructor(
readonly elementRef:ElementRef,
@Inject(OpModalLocalsToken) public locals:OpModalLocalsMap,
@@ -60,8 +58,9 @@ export class DynamicContentModalComponent extends OpModalComponent implements On
super.ngOnInit();
// Append the dynamic body
- this.wrapper.classList.add(this.locals.modalClassName);
- this.wrapper.appendChild(this.locals.modalBody);
+ const wrapper = this.$element.children[0];
+ wrapper.classList.add(this.locals.modalClassName);
+ wrapper.innerHTML = this.locals.modalBody;
const modal = document.querySelector('.spot-modal') as HTMLElement;
const closeButton = modal.querySelector('[dynamic-content-modal-close-button]') as HTMLButtonElement;