Browse Source

Resolvendo problema de marcar todos os checkbox

pull/3294/head
ulyssesBML 4 years ago
parent
commit
f0003ddf89
  1. 9
      sapl/templates/sessao/votacao/votacao_bloco.html

9
sapl/templates/sessao/votacao/votacao_bloco.html

@ -119,16 +119,13 @@
<script language="JavaScript"> <script language="JavaScript">
function checkAll(elem) { function checkAll(elem) {
let checkboxes = document.getElementsByName('marcadas_1'); let checkbox_types = ['marcadas_1', 'marcadas_2', 'marcadas_4']
for (t in checkbox_types){
let checkboxes = document.getElementsByName(checkbox_types[t]);
for (let i = 0; i < checkboxes.length; i++) { for (let i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].type == 'checkbox') if (checkboxes[i].type == 'checkbox')
checkboxes[i].checked = elem.checked; checkboxes[i].checked = elem.checked;
} }
checkboxes = document.getElementsByName('marcadas_2');
for (let i = 0; i < checkboxes.length; i++) {
if (checkboxes[i].type == 'checkbox')
checkboxes[i].checked = elem.checked;
} }
} }

Loading…
Cancel
Save