Commit 6a8561ea authored by Thomas Löffler's avatar Thomas Löffler

Get class for alert container from severity

parent 5ab50fcc
Pipeline #7912 passed with stages
in 3 minutes and 36 seconds
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:f="http://typo3.org/ns/fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="container">
<div class="tx_terfe2">
<f:flashMessages as="flashMessages">
<f:if condition="{flashMessages}">
<f:for each="{flashMessages}" as="flashMessage">
<div class="alert {flashMessage.class}" role="alert">
<f:if condition="{flashMessage.title}">
<f:then>
<h4 class="alert-heading"><strong class="fa fa-{flashMessage.iconName}"></strong> {flashMessage.title}</h4>
<f:format.html>{flashMessage.message}</f:format.html>
</f:then>
<f:else>
<strong class="fa fa-{flashMessage.iconName}"></strong> <f:format.html>{flashMessage.message}</f:format.html>
</f:else>
</f:if>
</div>
</f:for>
</f:if>
</f:flashMessages>
<div class="tx_terfe2_content">
<f:render section="main" />
</div>
</div>
<div class="tx_terfe2">
<f:flashMessages as="flashMessages">
<f:if condition="{flashMessages}">
<f:for each="{flashMessages}" as="flashMessage">
<f:variable name="class" value="alert-success" />
<f:if condition="{flashMessage.severity} == 1">
<f:variable name="class" value="alert-warning" />
</f:if>
<f:if condition="{flashMessage.severity} == 2">
<f:variable name="class" value="alert-danger" />
</f:if>
<div class="alert {class}" role="alert">
<f:if condition="{flashMessage.title}">
<f:then>
<h4 class="alert-heading"><strong class="fa fa-{flashMessage.iconName}"></strong> {flashMessage.title}</h4>
<f:format.html>{flashMessage.message}</f:format.html>
</f:then>
<f:else>
<strong class="fa fa-{flashMessage.iconName}"></strong>
<f:format.html>{flashMessage.message}</f:format.html>
</f:else>
</f:if>
</div>
</f:for>
</f:if>
</f:flashMessages>
<div class="tx_terfe2_content">
<f:render section="main" />
</div>
</div>
</div>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment