summaryrefslogtreecommitdiff
path: root/src/web/_views/_template/toast.php
blob: 902955c8e04388e97b1ad358eb0f219295d82e25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php /* Copyright (c) 2024 Freya Murphy */ ?>
<?php /* vi: syntax=php */ ?>
<?php
	$params = array();

	if ($detail)
		$params[] = lang('api_column_' . $detail);

	if ($hint)
		$params[] = $hint;

	$lang_msg = lang($msg, '', sub: $params);
	if(!$lang_msg)
		$lang_msg = $msg;
	else
		$lang_msg = ucfirst($lang_msg);

?>
<div class="toast <?=$type?>">
	<?=$lang_msg?>
	<?=ilang('action_close', class: 'action-close-toast')?>
</div>