Skip to content

Commit

Permalink
AUT-695 Allow line break in alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
jaagupkymmel authored and alarkvell committed Nov 20, 2022
1 parent da413e4 commit 53bed12
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
4 changes: 4 additions & 0 deletions disain/styles/components/_tab-login.scss
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
display: block;
}
}
&__warning-item {
font-weight: bold;
white-space: pre-line;
}
&__content-wrap {
display: flex;
background-color: #fff;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/styles/main.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/main/resources/templates/fragments/loginform.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
<div th:if="${@thymeleafSupport.hasStaticAlert()}" class="alert alert-warning">
<ul>
<li th:each="alert : ${activeAlerts}">
<strong th:if="${alert.isLoadedFromConf()}"
th:utext="${alert.getAlertMessage(#locale.language)}"></strong>
<span th:if="${alert.isLoadedFromConf()}"
th:utext="${alert.getAlertMessage(#locale.language)}"
class="c-tab-login__warning-item"></span>
</li>
</ul>
</div>
Expand Down
14 changes: 8 additions & 6 deletions src/main/resources/templates/fragments/logintabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ <h2 th:utext="${#messages.msg('label.' + tab_id + '.' + (title ?: 'title'))}"></
<div class="alert alert-warning">
<ul>
<li th:each="alert : ${alerts}">
<strong th:if="${alert.isLoadedFromConf()}"
th:utext="${alert.getAlertMessage(#locale.language)}"></strong>
<strong th:unless="${alert.isLoadedFromConf()}"
th:text="${alert.getAlertMessage(#locale.language)}"></strong>
<span th:if="${alert.isLoadedFromConf()}"
th:utext="${alert.getAlertMessage(#locale.language)}"
class="c-tab-login__warning-item"></span>
<span th:unless="${alert.isLoadedFromConf()}"
th:text="${alert.getAlertMessage(#locale.language)}"
class="c-tab-login__warning-item"></span>
</li>
<li th:if="${tab_id == 'id-card'}" id="webeid-warning" class="hidden aria-hidden">
<strong th:utext="#{message.idc.webeid.not.available}" id="webeid-not-available" class="hidden aria-hidden">Web-eID not available.</strong>
<strong th:utext="#{message.idc.webeid.error}" id="webeid-error" class="hidden aria-hidden">Web-eID error, code {0}.</strong>
<span th:utext="#{message.idc.webeid.not.available}" id="webeid-not-available" class="hidden aria-hidden c-tab-login__warning-item">Web-eID not available.</span>
<span th:utext="#{message.idc.webeid.error}" id="webeid-error" class="hidden aria-hidden c-tab-login__warning-item">Web-eID error, code {0}.</span>
</li>
</ul>
</div>
Expand Down

0 comments on commit 53bed12

Please sign in to comment.