. // if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * Generate a submit button. When pressed this button calls * a controller and passes a parameter. * * Note, as submit buttons uses their own form, they must not * be embedeed inside a form. */ class ButtonDelete extends Button { /** * Constructor - Sets Button's Preferences * * The constructor can be passed an array of attributes values * @param unknown_type $label * @param unknown_type $controller * @param unknown_type $param * @return the object */ public function __construct($attrs = array()) { // Defaults $attrs['label'] = 'Supprimer'; $attrs['action'] = 'delete'; $attrs['confirm'] = TRUE; if (!isset($attrs['confirmMsg'])) { $attrs['confirmMsg'] = "Etes vous sur de vouloir supprimer "; } $attrs['image'] = theme() . "/images/delete.png"; parent::__construct($attrs); } }