Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="../vendas/" method="post">
- <?= $this->Form->create("carrinho", ["class " => "form-add", "action" => "carrinho", "controller" => "Produtos-Vendas"]) ?>
- <button type="submit" class="btn-success btn">Carrinho (<span id="additem"></span>)</button>
- <?php foreach ($produtos as $produto): ?>
- <tr>
- <td><?= $this->Number->format($produto->id) ?></td>
- <td><?= h($produto->name) ?></td>
- <td><?= h($produto->cor) ?></td>
- <td><?= h($produto->tecido) ?></td>
- <td><?= $this->Number->format($produto->estoque) ?></td>
- <td><?= $this->Number->format($produto->preco) ?></td>
- <td>
- <input type="checkbox" id="checkTodos" name="check[]" class="checkbox checkTodos" value="<?php echo $produto['id'];?>">
- <input type="checkbox" class="checkado" name="nome" value="<?php echo $produto['name'];?>">
- </td>
- </tr>
- <?php endforeach; ?>
- <?= $this->Form->end() ?>
- </form>
- $(".checkTodos").click(function(){
- $('.checkado' && '#checkado').not(this).prop('checked', this.checked);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement