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

	if ($detail) {
		array_push($params, lang('api_column_' . $detail));
	}

	if ($hint) {
		array_push($params, $hint);
	}

	$lang_msg = lang($msg, FALSE, sub: $params);

	if(!$lang_msg) {
		$lang_msg = $msg;
	} else {
		$lang_msg = ucfirst($lang_msg);
	}

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