mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
attempt to make show hide work
This commit is contained in:
parent
0a6a2c968c
commit
02b2af7d51
@ -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
|
||||
|
@ -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;
|
||||
},
|
||||
})
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user