fixed deprecated alerts in backend. we need a template for alerts
This commit is contained in:
parent
b505130621
commit
a1b6599a29
@ -324,10 +324,11 @@ newCourseForm template = identForm FIDcourse $ \html -> do
|
||||
(FormFailure errorMsgs,
|
||||
[whamlet|
|
||||
<div class="alert alert-danger">
|
||||
<h4> Fehler:
|
||||
<ul>
|
||||
$forall errmsg <- errorMsgs
|
||||
<li> #{errmsg}
|
||||
<div class="alert__content">
|
||||
<h4> Fehler:
|
||||
<ul>
|
||||
$forall errmsg <- errorMsgs
|
||||
<li> #{errmsg}
|
||||
^{widget}
|
||||
|]
|
||||
)
|
||||
|
||||
@ -100,10 +100,11 @@ makeSheetForm msId template = identForm FIDsheet $ \html -> do
|
||||
(FormFailure errorMsgs,
|
||||
[whamlet|
|
||||
<div class="alert alert-danger">
|
||||
<h4> Fehler:
|
||||
<ul>
|
||||
$forall errmsg <- errorMsgs
|
||||
<li> #{errmsg}
|
||||
<div class="alert__content">
|
||||
<h4> Fehler:
|
||||
<ul>
|
||||
$forall errmsg <- errorMsgs
|
||||
<li> #{errmsg}
|
||||
^{widget}
|
||||
|]
|
||||
)
|
||||
|
||||
@ -149,10 +149,11 @@ newTermForm template html = do
|
||||
(FormFailure errorMsgs,
|
||||
[whamlet|
|
||||
<div class="alert alert-danger">
|
||||
<h4> Fehler:
|
||||
<ul>
|
||||
$forall errmsg <- errorMsgs
|
||||
<li> #{errmsg}
|
||||
<div class="alert__content">
|
||||
<h4> Fehler:
|
||||
<ul>
|
||||
$forall errmsg <- errorMsgs
|
||||
<li> #{errmsg}
|
||||
^{widget}
|
||||
|]
|
||||
)
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
$forall (status, msg) <- mmsgs
|
||||
$with status2 <- bool status "info" (status == "")
|
||||
<div class="alert alert-#{status2}">
|
||||
<div .alert__content>#{msg}
|
||||
<div .alert__close>_{MsgCloseAlert}
|
||||
<div .alert__content>
|
||||
#{msg}
|
||||
|
||||
<!-- actual content -->
|
||||
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
Die Reimplementierung von
|
||||
UniWorX ist noch nicht abgeschlossen.
|
||||
|
||||
<p .alert .alert-danger>Das System ist noch nicht produktiv einsetzbar
|
||||
<div .alert .alert-danger>
|
||||
<div .alert__content>Das System ist noch nicht produktiv einsetzbar
|
||||
|
||||
<hr>
|
||||
<div .container>
|
||||
|
||||
@ -4,9 +4,14 @@
|
||||
window.utils = window.utils || {};
|
||||
|
||||
window.utils.alert = function(alertEl) {
|
||||
alertEl.querySelector('.alert__close').addEventListener('click', function(event) {
|
||||
var closeEl = document.createElement('DIV');
|
||||
closeEl.classList.add('alert__close');
|
||||
// TODO: fix this. How to request translation in *.julius .files?
|
||||
closeEl.innerText = "_{MsgCloseAlert}";
|
||||
closeEl.addEventListener('click', function(event) {
|
||||
alertEl.classList.add('alert--invisible');
|
||||
});
|
||||
alertEl.appendChild(closeEl);
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.alert-danger,
|
||||
.alert-error {
|
||||
border-color: var(--color-error);
|
||||
background-color: #fff5f7;
|
||||
|
||||
Reference in New Issue
Block a user