diff --git a/add_asset.html b/add_asset.html index bf97a82..31237d4 100644 --- a/add_asset.html +++ b/add_asset.html @@ -127,7 +127,7 @@ {{:assign fin=$end_date|strtotime}} {{:assign var="years_data.%d"|args:$id value=$debut|cat:" "|cat:$fin}} {{:assign var="open_years.%d"|args:$id value=$label}} - {{if $start_date|strtotime <= $now && $end_date|strtotime >= $now}} + {{if $debut <= $now && $now <= $fin}} {{:assign selected_year=$id}} {{/if}} {{/years}} @@ -187,14 +187,18 @@

+{{:admin_footer}} - -{{:admin_footer}} diff --git a/scripts.js b/scripts.js index 8dcde5f..e530523 100644 --- a/scripts.js +++ b/scripts.js @@ -41,8 +41,8 @@ function disableOptions(idSelect, init, values) { } } -// choisir les exercices affichés selon la date d'acquisition -function setYears(evt, id_date = 'f_date_achat', id_exercices = 'f_id_year', id_years = 'f_years_data') +// choisir les exercices affichés selon la date paramètre +function chooseYears(id_date, id_exercices, id_years) { // masquer le message d'erreur document.getElementById('erreur').setAttribute('class', 'hidden');