32 lines
1.3 KiB
HTML
32 lines
1.3 KiB
HTML
<div class="{{ model.FLAG_OVERLAY }} {{ model.FLAG_COLLAPSED }} {{ model.FLAG_CARD }}" id="{{ model.ID_OVERLAY_ERROR }}" style="visibility: hidden;" z-index="2">
|
|
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
|
<h2>Error:</h2>
|
|
<div id="{{ model.ID_LABEL_ERROR }}"></div>
|
|
</div>
|
|
<div class="{{ model.FLAG_CONTAINER }} {{ model.FLAG_ROW }}">
|
|
{% set block_id = 'button_cancel' %}
|
|
{% include 'components/common/buttons/_buttons_save_cancel.html' %}
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
var idOverlayError = "#{{ model.ID_OVERLAY_ERROR}}";
|
|
function hookupOverlayError() {
|
|
let overlay = document.querySelector(idOverlayError);
|
|
let selectorButtonCancel = idOverlayError + ' button.' + flagCancel;
|
|
|
|
initialiseEventHandler(selectorButtonCancel, flagInitialised, function(buttonCancel) {
|
|
buttonCancel.onclick = function() {
|
|
overlay.style.visibility = 'hidden';
|
|
};
|
|
});
|
|
}
|
|
hookupOverlayError();
|
|
|
|
function showOverlayError(msgError) {
|
|
let overlay = document.querySelector("#{{ model.ID_OVERLAY_ERROR }}");
|
|
let labelError = overlay.querySelector('#{{ model.ID_LABEL_ERROR }}');
|
|
labelError.innerText = msgError;
|
|
overlay.style.visibility = 'visible';
|
|
}
|
|
</script> |