New generic functions for search pictos, to be used in every lists
This commit is contained in:
parent
f6df17bc01
commit
64fe082539
@ -2252,6 +2252,47 @@ function img_phone($titlealt = 'default', $option = 0)
|
|||||||
return img_picto($titlealt, $img);
|
return img_picto($titlealt, $img);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show search logo
|
||||||
|
*
|
||||||
|
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||||
|
* @param string $other Add more attributes on img
|
||||||
|
* @return string Retourne tag img
|
||||||
|
*/
|
||||||
|
function img_search($titlealt = 'default', $other = '')
|
||||||
|
{
|
||||||
|
global $conf, $langs;
|
||||||
|
|
||||||
|
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
|
||||||
|
|
||||||
|
$img = img_picto($titlealt, 'search.png', $other, false, 1);
|
||||||
|
|
||||||
|
$input = '<input type="image" class="liste_titre" name="button_search" src="'.$img.'" ';
|
||||||
|
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
|
||||||
|
|
||||||
|
return $input;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show search logo
|
||||||
|
*
|
||||||
|
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||||
|
* @param string $other Add more attributes on img
|
||||||
|
* @return string Retourne tag img
|
||||||
|
*/
|
||||||
|
function img_searchclear($titlealt = 'default', $other = '')
|
||||||
|
{
|
||||||
|
global $conf, $langs;
|
||||||
|
|
||||||
|
if ($titlealt == 'default') $titlealt = $langs->trans('Search');
|
||||||
|
|
||||||
|
$img = img_picto($titlealt, 'searchclear.png', $other, false, 1);
|
||||||
|
|
||||||
|
$input = '<input type="image" class="liste_titre" name="button_removefilter" src="'.$img.'" ';
|
||||||
|
$input.= 'value="'.dol_escape_htmltag($titlealt).'" title="'.dol_escape_htmltag($titlealt).'" >';
|
||||||
|
|
||||||
|
return $input;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show information for admin users
|
* Show information for admin users
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user