diff --git a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/job/question/ExtensionBreakingQuestion.form.vm b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/job/question/ExtensionBreakingQuestion.form.vm index 1e9685702e76..8c2087ca21da 100644 --- a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/job/question/ExtensionBreakingQuestion.form.vm +++ b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/job/question/ExtensionBreakingQuestion.form.vm @@ -17,16 +17,11 @@ ## Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ## 02110-1301 USA, or see the FSF site: http://www.fsf.org. ## --------------------------------------------------------------------------- -##!source.syntax=xwiki/2.1 -{{velocity}} #template('job/question/macros.vm') -{{html clean=false}} #questionHeader() -{{/html}} #set ($jobStatus = $job.status) #set ($question = $jobStatus.question) #define ($warningMessageContent) -{{html clean=false}}
$escapetool.xml($services.localization.render("job.question.ExtensionBreakingQuestion.${job.type}.explanation"))
#set ($url = $xwiki.getURL($services.model.createDocumentReference('', 'XWiki', 'XWikiPreferences'), 'admin', 'section=XWiki.Extensions&search=&repo=installed')) #set ($link = '') @@ -43,14 +38,9 @@ #questionButtons($jobStatus) -{{/html}}#end +#end ## We want to use the XWiki macro here because we need its parameters -{{warning cssClass='deleteWarningExtensions' title='$escapetool.xml($services.localization.render("job.question.ExtensionBreakingQuestion.${job.type}.title"))'}} -$warningMessageContent -{{/warning}} +#_genericMessage("$warningMessageContent", 'warning', 'warning', 'warning', false, 'deleteWarningExtensions', $escapetool.xml($services.localization.render("job.question.ExtensionBreakingQuestion.${job.type}.title"))) -{{html clean=false}} #questionFooter() -{{/html}} -{{/velocity}} diff --git a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/macros.vm b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/macros.vm index 82a697cefc67..7e757e7abb66 100644 --- a/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/macros.vm +++ b/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/macros.vm @@ -955,11 +955,13 @@ $html ### This velocity macro aims at providing an element similar to a XWiki Macro-Message in places where this XWikiMacro ### cannot be used. -#macro(_genericMessage $text $classAffix $iconName $prettyNameKey $isInline) - <#if($isInline)span#{else}div#end class="box ${classAffix}message"> +#macro(_genericMessage $text $classAffix $iconName $prettyNameKey $isInline $extraClass $title) + <#if($isInline)span#{else}div#end class="box ${classAffix}message $!{extraClass}"> $services.icon.renderHTML($iconName) $services.localization.render($prettyNameKey) + #if("$!title" != "")$text
+ #if("$!title" != "")