Améliorations cosmétiques
This commit is contained in:
parent
3fc96927a5
commit
0c4f39b21a
5 changed files with 26 additions and 16 deletions
|
|
@ -1,9 +1,9 @@
|
|||
// activer/désactiver les champs passés en paramètres
|
||||
function toggleInputs(idcb, idfields) {
|
||||
const noamort = document.getElementById(idcb);
|
||||
const elem = document.getElementById(idcb);
|
||||
for (let id of idfields) {
|
||||
const field = document.getElementById(id);
|
||||
if (noamort.checked) {
|
||||
if (elem.checked) {
|
||||
field.removeAttribute("disabled");
|
||||
}
|
||||
else {
|
||||
|
|
@ -13,10 +13,10 @@ function toggleInputs(idcb, idfields) {
|
|||
}
|
||||
|
||||
function toggleVisibility(idcheck, fields) {
|
||||
const amortcb = document.getElementById(idcheck);
|
||||
const elem = document.getElementById(idcheck);
|
||||
for (let id of fields) {
|
||||
const field = document.getElementById(id);
|
||||
if (amortcb.checked) {
|
||||
if (elem.checked) {
|
||||
field.setAttribute('class', '');
|
||||
} else {
|
||||
field.setAttribute('class', 'hidden');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue