configui/templates/components/error.tmpl

17 lines
458 B
Cheetah
Raw Normal View History

{{define "components/error"}}
<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>
</div>
<script>
function ErrorTog(){
let el = document.getElementById('error_view');
el.classList.toggle('is-hidden');
}
function ShowError(msg){
let el = document.getElementById('err_msg');
el.innerHTML = msg;
ErrorTog();
}
</script>
{{end}}