Skip to content

Commit

Permalink
modal wrapper changes reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRob100 committed Nov 15, 2024
1 parent 4f97ef8 commit b9b6ebc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/components/Modal/AjaxModalWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ const contentDiv = ref(null);
// eslint-disable-next-line no-unused-vars
const pkp = window.pkp;
// to collect data change events, which are passed on close
// used in galleys when the new galley id is needed to open upload modal
const dataChangedEvents = [];
// Fetches html content from legacy endpoints
const {data: modalData, fetch: fetchAssignParticipantPage} = useFetch(
legacyOptions.url,
);
const {data: modalData, fetch: fetchModalData} = useFetch(legacyOptions.url);
// Legacy modal has mechanism where it needs to check with form whether it can close
// Mimicking this behaviour
Expand Down Expand Up @@ -117,7 +117,7 @@ function onVueFormSuccess(formId, data) {
}
onMounted(async () => {
await fetchAssignParticipantPage();
await fetchModalData();
if (modalData.value) {
$(contentDiv.value).html(modalData.value.content);
$(contentDiv.value).bind('formSubmitted', passToHandlerElement);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/ModalManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const {
} = storeToRefs(useModalStore());
const activeModalId = computed(() => {
if (sideModal3?.value?.opened) {
if (sideModal3.value?.opened) {
return sideModal3.value.modalId;
} else if (sideModal2.value?.opened) {
return sideModal2.value.modalId;
Expand Down

0 comments on commit b9b6ebc

Please sign in to comment.