1. Refactoring form objects and database objects to use inheritance and abstract base class for consistency and reduced redundancy.\n2. Contact us page button links updated to resolve error of missing link causing page refresh instead of expected functionality.
This commit is contained in:
32
templates/components/common/temporary/_overlay_error.html
Normal file
32
templates/components/common/temporary/_overlay_error.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user