Add function getTooltip()

This commit is contained in:
billz 2023-03-19 16:44:18 +01:00
parent d4b107a07f
commit 67bf364b04
1 changed files with 11 additions and 0 deletions

View File

@ -792,3 +792,14 @@ function get_public_ip()
return $public_ip[0];
}
/* Returns a standardized tooltip
*
* @return string $tooltip
*/
function getTooltip($msg, $id, $visible = true)
{
($visible) ? $opt = 'visible' : $opt = 'invisible';
$tooltip = '<i class="fas fa-question-circle text-muted ' .$opt.'" id="' .$id. '" data-toggle="tooltip" data-placement="auto" title="' . _($msg). '"></i>';
return $tooltip;
}