Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. <form action="../vendas/" method="post">
  2. <?= $this->Form->create("carrinho", ["class " => "form-add", "action" => "carrinho", "controller" => "Produtos-Vendas"]) ?>
  3. <button type="submit" class="btn-success btn">Carrinho (<span id="additem"></span>)</button>
  4. <?php foreach ($produtos as $produto): ?>
  5. <tr>
  6. <td><?= $this->Number->format($produto->id) ?></td>
  7. <td><?= h($produto->name) ?></td>
  8. <td><?= h($produto->cor) ?></td>
  9. <td><?= h($produto->tecido) ?></td>
  10. <td><?= $this->Number->format($produto->estoque) ?></td>
  11. <td><?= $this->Number->format($produto->preco) ?></td>
  12. <td>
  13. <input type="checkbox" id="checkTodos" name="check[]" class="checkbox checkTodos" value="<?php echo $produto['id'];?>">
  14. <input type="checkbox" class="checkado" name="nome" value="<?php echo $produto['name'];?>">
  15. </td>
  16. </tr>
  17. <?php endforeach; ?>
  18. <?= $this->Form->end() ?>
  19. </form>
  20.  
  21. $(".checkTodos").click(function(){
  22. $('.checkado' && '#checkado').not(this).prop('checked', this.checked);
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement