1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Add function getTooltip()

This commit is contained in:
billz 2023-03-19 16:44:18 +01:00
parent d4b107a07f
commit 67bf364b04

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;
}