mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
pure js checkbox check and uncheck buttons
This commit is contained in:
parent
1b1b0da7f0
commit
2475b6b7ad
@ -34,7 +34,11 @@ $this->assign('title', __('Schöpfungstransaktion'));
|
||||
</style>
|
||||
<div class="grd_container_small">
|
||||
|
||||
<button type="button" onclick="checkAll()" >Alle auswählen</button>
|
||||
<button type="button" onclick="uncheckAll()">Alle abwählen</button>
|
||||
<div style="margin-bottom:5px"></div>
|
||||
<?= $this->Form->create($creationForm) ?>
|
||||
|
||||
<fieldset>
|
||||
<?= $this->Form->control('memo'); ?>
|
||||
<?= $this->Form->control('amount'); ?>
|
||||
@ -58,3 +62,24 @@ $this->assign('title', __('Schöpfungstransaktion'));
|
||||
<?= $this->Form->button(__('Weitere Transaktion erstellen'), ['name' => 'add', 'class' => 'grd-form-bn grd_clickable grd-width-200']) ?>
|
||||
<?= $this->Form->end() ?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function checkAll()
|
||||
{
|
||||
var inputs = document.getElementsByTagName("input");
|
||||
for(var i = 0; i < inputs.length; i++) {
|
||||
if(inputs[i].type == "checkbox") {
|
||||
inputs[i].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function uncheckAll()
|
||||
{
|
||||
var inputs = document.getElementsByTagName("input");
|
||||
for(var i = 0; i < inputs.length; i++) {
|
||||
if(inputs[i].type == "checkbox") {
|
||||
inputs[i].checked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
x
Reference in New Issue
Block a user