attempt to make show hide work

This commit is contained in:
Julie Lenaerts 2022-01-20 17:12:18 +01:00
parent 0a6a2c968c
commit 02b2af7d51
2 changed files with 5 additions and 10 deletions

View File

@ -39,6 +39,7 @@ var ShowHide = function(options) {
contents.push(el); contents.push(el);
} }
container_content.push(contents); container_content.push(contents);
console.log('container content', container_content);
} }
// attach the listener on each input // attach the listener on each input

View File

@ -7,7 +7,6 @@ window.addEventListener('DOMContentLoaded', function() {
thirdpartyContainer = document.querySelector('#thirdparty-entity'), thirdpartyContainer = document.querySelector('#thirdparty-entity'),
freetextContainer = document.querySelector('#freetext-entity') freetextContainer = document.querySelector('#freetext-entity')
; ;
if (null === linkedEntityContainer) { if (null === linkedEntityContainer) {
return; return;
} }
@ -17,17 +16,12 @@ window.addEventListener('DOMContentLoaded', function() {
load_event: null, load_event: null,
froms: [linkedEntityContainer], froms: [linkedEntityContainer],
container: [personContainer, thirdpartyContainer, freetextContainer], container: [personContainer, thirdpartyContainer, freetextContainer],
test: function(containers, arg2, arg3) { test: function(froms, event) {
for (let container of containers) { if (event) {
for (let input of container.querySelectorAll('input')) { console.log(event);
if (!input.checked) {
return true;
} else {
return false;
}
}
} }
return true;
}, },
}) })
}); });