configui/templates/components/error.tmpl

17 lines
458 B
Cheetah
Raw Normal View History

2021-10-20 10:20:14 +00:00
{{define "components/error"}}
2021-10-20 15:51:39 +00:00
<div class="notification is-danger {{if not .Error}}is-hidden{{end}}" id="error_view">
<button class="delete" onclick="ErrorTog()"></button>
<p id="err_msg">{{.Error}}</p>
2021-10-20 14:02:10 +00:00
</div>
<script>
function ErrorTog(){
let el = document.getElementById('error_view');
2021-10-20 15:51:39 +00:00
el.classList.toggle('is-hidden');
2021-10-20 14:02:10 +00:00
}
function ShowError(msg){
let el = document.getElementById('err_msg');
el.innerHTML = msg;
ErrorTog();
}
</script>
2021-10-20 10:20:14 +00:00
{{end}}