Skip to content

Commit fb8ee9d

Browse files
committed
fix: serve v2 tpl in group association field
1 parent 58e2705 commit fb8ee9d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/controllers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Controllers.renderAdminPage = async (req, res) => {
3232
strategies,
3333
associations,
3434
groupNames,
35+
isV2,
3536
});
3637
};
3738

static/lib/admin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@ function handleSettingsForm() {
112112
function handleAssociations() {
113113
const addEl = document.querySelector('[data-action="add"]');
114114
const fieldset = document.getElementById('associations');
115-
console.log(addEl, fieldset);
116115
if (!addEl || !fieldset) {
117116
return;
118117
}
119118

120119
addEl.addEventListener('click', async () => {
121-
let html = await render('partials/group-association-field', {
120+
let html = await render(`partials/group-association-field${ajaxify.data.isV2 ? '-v2' : ''}`, {
122121
groupNames: ajaxify.data.groupNames,
123122
});
124123
html = new DOMParser().parseFromString(html, 'text/html').body.childNodes;

0 commit comments

Comments
 (0)