I'm a novice with cakephp and I'm creating a form to add, edit and delete records. The problem is that I try to make the delete link look like a button, I have achieved it with css, creating a button class to which I gave a style. The issue is that I do not understand 2 things:
1) What is the difference between link and postlink? 2) If I apply the class button to postlink ignores it, how can I apply the style of the button class?
I copy the code:
<h1>Listado de Usuarios</h1>
<p><?php echo $this->Html->link("Agrega Nuevo", array('action' => 'add')); ?></p>
<table>
<tr>
<th>Id</th>
<th>Nombres</th>
<th>Apellidos</th>
<th>Sector</th>
<th>Teléfonos</th>
<th>@mail</th>
<th>Acciones</th>
</tr>
<?php foreach ($registros as $registros):?>
<tr>
<td><?php echo $registros ['Maestro']['id'];?></td>
<td><?php echo $registros ['Maestro']['nombre'];?></td>
<td><?php echo $registros ['Maestro']['apellido'];?></td>
<td><?php echo $registros ['Maestro']['sector'];?></td>
<td><?php echo $registros ['Maestro']['tele'];?></td>
<td><?php echo $registros ['Maestro']['email'];?></td>
<td>
<?php echo $this->Html->link("Editar", array('controller' => 'maestros', 'action'=>'editar', $registros['Maestro']['id']), array('class' => 'button')); ?>
<?php echo $this->Form->postlink('Eliminar', array('action' => 'eliminar', $registros['Maestro']['id']), array('confirm'=>'Eliminar a ' . $registros['Maestro']['id']), array('class' => 'button')); ?>
</td>
</tr>
<?php endforeach;?>
</table>
As I said, in the echo that leads to 'edit', it takes the 'button' style perfectly, in which it leads to 'Delete', ignores it ... I will appreciate any help!