Réparer les scripts intégrés aux vues

This commit is contained in:
Alexandre NOEL 2026-09-03 23:08:03 +02:00
commit 64ce1285aa
12 changed files with 112 additions and 97 deletions

View file

@ -56,8 +56,8 @@ if (!empty($litter['birth_date'])) {
</form>
<script>
document.getElementById('litterAnimalSearch')?.addEventListener('input', event => {
const query = event.target.value.trim().toLocaleLowerCase( < ? = json_encode(I18n::locale() === 'fr' ?
'fr' : 'en') ? > );
const query = event.target.value.trim().toLocaleLowerCase( <?= json_encode(I18n::locale() === 'fr' ?
'fr' : 'en') ?> );
document.querySelectorAll('.litter-animal-choice').forEach(choice => {
choice.classList.toggle('d-none', query !== '' && !choice.dataset.search.includes(query));
});