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);
}
container_content.push(contents);
console.log('container content', container_content);
}
// attach the listener on each input

View File

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