mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
js files put in place + select menus added for selecting person/thirdparty/... show-hide not working yet
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import {ShowHide} from 'ChillMainAssets/lib/show_hide/show_hide.js';
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
let
|
||||
linkedEntityContainer = document.querySelector('#linked-entity'),
|
||||
personContainer = document.querySelector('#person-entity'),
|
||||
thirdpartyContainer = document.querySelector('#thirdparty-entity'),
|
||||
freetextContainer = document.querySelector('#freetext-entity')
|
||||
;
|
||||
|
||||
if (null === linkedEntityContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
new ShowHide({
|
||||
debug: true,
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
});
|
@@ -6,7 +6,19 @@
|
||||
|
||||
{{ form_row(form.kind) }}
|
||||
|
||||
{{ form_row(form.linkedEntity) }}
|
||||
<div id="linked-entity">
|
||||
{{ form_row(form.linkedEntity) }}
|
||||
</div>
|
||||
|
||||
<div id="person-entity">
|
||||
{{ form_row(form.person) }}
|
||||
</div>
|
||||
<div id="thirdparty-entity">
|
||||
{{ form_row(form.thirdparty) }}
|
||||
</div>
|
||||
<div id="freetext-entity">
|
||||
{{ form_row(form.freetext) }}
|
||||
</div>
|
||||
|
||||
{{ form_row(form.comment) }}
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">comment zone</div>
|
||||
<div class="item-col">doing</div>
|
||||
<div class="item-col">....</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
{# <div class="item-col">today</div> #}
|
||||
@@ -31,4 +31,8 @@
|
||||
|
||||
{% include "@ChillPerson/PersonResource/create.html.twig" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{# {{ encore_entry_script_tags('page_person_resource') }} #}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user