0
How do I select a line and when I click, the checkbox is checked?
<tbody>
<?php foreach ($users as $user): ?>
<!--tr behaviour="app.behaviours.panel"
data-panel-action="show"
data-panel-href="<?php // echo $this->Html->url(['action' => 'update', $user['User']['code']]); ?>"
-->
<tr>
<td>
<?php
$this->App->setattribute('type', 'checkbox');
$this->App->setattribute('toggle', 'User.id');
if ($user['User']['id'] == '1' or $user['User']['id'] == '2') {
$this->App->setattribute('disabled', 'disabled');
}
echo $this->App->createinput(false, 'toggle.' . $user['User']['id']);
?>
</td>
<td><?php echo $user['User']['id']; ?></td>
<td><?php echo $user['User']['name']; ?></td>
<td><?php echo $user['User']['email']; ?></td>
<td><?php echo $user['User']['username']; ?></td>
</tr>
Tried to use the label?
– Sr. André Baill
It doesn’t have to be. I just want . js to take a class in <tr> and apply javascript to each line
– Larissa