Button_image Add button with icon
This commit is contained in:
parent
cdda613318
commit
df70c11251
1 changed files with 17 additions and 0 deletions
|
|
@ -445,6 +445,23 @@ class HtmlInput
|
|||
$r.='<input type="button" id="'.$id.'" class="'.$p_class.'" onclick="'.$javascript.'" value="'.h($action).'">';
|
||||
return $r;
|
||||
|
||||
}
|
||||
/**
|
||||
* button Html image
|
||||
*@param $javascript javascript to execute
|
||||
* @param $id id of the button
|
||||
* @param $class class of the button
|
||||
* @param $p_image image
|
||||
*/
|
||||
static function button_image($javascript,$id="xx",$p_class='class="button"',$p_image="")
|
||||
{
|
||||
if ($id=="xx"){
|
||||
$id=HtmlInput::generate_id("xx");
|
||||
}
|
||||
$r="";
|
||||
$r.='<image id="'.$id.'" '.$p_class.' onclick="'.$javascript.'" src="'.$p_image.'" />';
|
||||
return $r;
|
||||
|
||||
}
|
||||
/**
|
||||
* Return a html string with an anchor to hide a div, put it in the right corner
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue