Sunday 15 April 2012

CakePHP:2.0 : How to remove delete button name and add bootstrap icon -



CakePHP:2.0 : How to remove delete button name and add bootstrap icon -

i trying remove delete button name , trying add together icon in here.i have add, edit icon code

<a href="/cakeauth/users/edit/<?php echo $user['user']['id'];?>" class="btn btn-sm btn-warning"> <span class="glyphicon glyphicon-edit"></span> </a>

now in delete button how can add together bootstrap icon ?

echo $this->form->postlink(__('delete'), array('action' => 'delete', $user['user']['id']), array(), __('are sure want delete # %s?', $user['user']['id']));

please add together below line

array('esacpe',false)

or

you should seek code.

echo $this->form->postlink( $this->html->tag('i', '', array('class' => 'glyphicon glyphicon-remove')). " delete", array('action' => 'delete', $user['user']['id']), array('escape'=>false), __('are sure want delete # %s?', $user['user']['id']), array('class' => 'btn btn-mini') );

please refer below link:

how create icon within form postlink cakephp , twitter bootstrap

twitter-bootstrap cakephp

No comments:

Post a Comment