diff options
author | mwithheld <796986+mwithheld@users.noreply.github.com> | 2021-11-24 23:27:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 23:27:30 +0300 |
commit | d028bd2024d4d32cc732c835f45fa0dc69c9fa87 (patch) | |
tree | 0d25ad60d4940e0de103aaba1eac01677a44ef28 /plugins/Installation | |
parent | af4d6002ca0039f4ea702aa8456f7e0c1cc3746c (diff) |
Fix System check widget shows wrong tooltip text (#18029)
* Add preg_replace filter
* 18006 Fix System check widget shows wrong tooltip text
Diffstat (limited to 'plugins/Installation')
-rw-r--r-- | plugins/Installation/templates/getSystemCheckWidget.twig | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/plugins/Installation/templates/getSystemCheckWidget.twig b/plugins/Installation/templates/getSystemCheckWidget.twig index ec6fc72424..a59bbebc9e 100644 --- a/plugins/Installation/templates/getSystemCheckWidget.twig +++ b/plugins/Installation/templates/getSystemCheckWidget.twig @@ -5,16 +5,32 @@ {% if numErrors %} <ul> - {% for error in errors %} - <li title="{{ error.getLongErrorMessage|default(error.getItems()[0].getComment())|e('html_attr') }}" class="system-check-widget-error"><span class="icon-error"></span> {{ error.getLabel }}</li> + {% for thisResult in errors %} + {% set checkItemMessages = '' %} + {% if thisResult.getLongErrorMessage is empty and thisResult.getItems()|length > 1 %} + {% for checkItem in thisResult.getItems() %} + {% if checkItem.getStatus is same as('warning') %} + {% set checkItemMessages = checkItemMessages ~ checkItem.getComment() %} + {% endif %} + {% endfor %} + {% endif %} + <li title="{{ checkItemMessages|default(thisResult.getLongErrorMessage)|default(thisResult.getItems()[0].getComment())|preg_replace('/<br.*?>/', "\n")|striptags|e('html_attr') }}" class="system-check-widget-error"><span class="icon-error"></span> {{ thisResult.getLabel }}</li> {% endfor %} </ul> {% endif %} {% if numWarnings %} <ul> - {% for warning in warnings %} - <li title="{{ warning.getLongErrorMessage|default(warning.getItems()[0].getComment())|e('html_attr') }}" class="system-check-widget-warning"><span class="icon-warning"></span> {{ warning.getLabel }}</li> + {% for thisResult in warnings %} + {% set checkItemMessages = '' %} + {% if thisResult.getLongErrorMessage is empty and thisResult.getItems()|length > 1 %} + {% for checkItem in thisResult.getItems() %} + {% if checkItem.getStatus is same as('warning') %} + {% set checkItemMessages = checkItemMessages ~ checkItem.getComment() %} + {% endif %} + {% endfor %} + {% endif %} + <li title="{{ checkItemMessages|default(thisResult.getLongErrorMessage)|default(thisResult.getItems()[0].getComment())|preg_replace('/<br.*?>/', "\n")|striptags|e('html_attr') }}" class="system-check-widget-warning"><span class="icon-warning"></span> {{ thisResult.getLabel }}</li> {% endfor %} </ul> {% endif %} @@ -23,12 +39,12 @@ <p> <br /> <a href="{{ linkTo({'module': 'Installation', 'action': 'systemCheckPage'}) }}" - >{{ 'Installation_SystemCheckViewFullSystemCheck'|translate }}</a> + >{{ 'Installation_SystemCheckViewFullSystemCheck'|translate }}</a> </p> {% endif %} <script> - jQuery(function () { + jQuery(function() { $('.widgetBody.system-check').tooltip({ track: true, content: function() { |