configui/templates/components/error.tmpl

25 lines
679 B
Cheetah
Raw Normal View History

{{define "components/error"}}
<div class="notification is-danger {{if not .Error}}is-hidden{{end}}" id="error_view">
2021-11-11 02:05:55 +00:00
<button class="delete" onclick="ErrorClose()"></button>
<p id="err_msg">{{.Error}}</p>
</div>
<script>
function ErrorTog(){
let el = document.getElementById('error_view');
el.classList.toggle('is-hidden');
}
2021-11-11 02:05:55 +00:00
function ErrorOpen(){
let el = document.getElementById('error_view');
el.classList.remove('is-hidden');
}
function ErrorClose(){
let el = document.getElementById('error_view');
el.classList.add('is-hidden');
}
function ShowError(msg){
let el = document.getElementById('err_msg');
el.innerHTML = msg;
2021-11-11 02:05:55 +00:00
ErrorOpen();
}
</script>
{{end}}