Bug recherche auteur ok
This commit is contained in:
parent
411b19df58
commit
e15003fc5c
5 changed files with 33 additions and 34 deletions
|
|
@ -1,32 +1,5 @@
|
|||
|
||||
<h2>coucou c'est le footer</h2>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
|
||||
<?php if ($strPage == "search") { ?>
|
||||
<script>
|
||||
// Gestion de l'affichage des champs de date
|
||||
const periodRadios = document.querySelectorAll('input[name="period"]');
|
||||
const dateExact = document.getElementById('date-exact');
|
||||
const dateRange = document.getElementById('date-range');
|
||||
|
||||
function toggleDateFields() {
|
||||
const selectedPeriod = document.querySelector('input[name="period"]:checked').value;
|
||||
|
||||
if (selectedPeriod === '0') {
|
||||
dateExact.style.display = 'block';
|
||||
dateRange.style.display = 'none';
|
||||
} else {
|
||||
dateExact.style.display = 'none';
|
||||
dateRange.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
periodRadios.forEach(radio => {
|
||||
radio.addEventListener('change', toggleDateFields);
|
||||
});
|
||||
|
||||
// Initialisation au chargement
|
||||
toggleDateFields();
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -167,3 +167,28 @@
|
|||
</section>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
// Gestion de l'affichage des champs de date
|
||||
const periodRadios = document.querySelectorAll('input[name="period"]');
|
||||
const dateExact = document.getElementById('date-exact');
|
||||
const dateRange = document.getElementById('date-range');
|
||||
|
||||
function toggleDateFields() {
|
||||
const selectedPeriod = document.querySelector('input[name="period"]:checked').value;
|
||||
|
||||
if (selectedPeriod === '0') {
|
||||
dateExact.style.display = 'block';
|
||||
dateRange.style.display = 'none';
|
||||
} else {
|
||||
dateExact.style.display = 'none';
|
||||
dateRange.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
periodRadios.forEach(radio => {
|
||||
radio.addEventListener('change', toggleDateFields);
|
||||
});
|
||||
|
||||
// Initialisation au chargement
|
||||
toggleDateFields();
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue