mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°3807 Fix container added for all Html components
This was causing issues for example in the setup, as any raw content is sent using \WebPage::add, which create an HTML component. I reverted the layout update, and created a new factory method to be used when needed : \Combodo\iTop\Application\UI\Base\Component\Html\HtmlFactory::MakeHtmlContent
This commit is contained in:
@@ -50,4 +50,16 @@ class HtmlFactory
|
||||
{
|
||||
return new Html('<p>'.$sContent.'</p>');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a container for contents having multiple HTML tags, for which we want to preserve style and don't apply minireset
|
||||
*
|
||||
* @param string $sContent
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Html\Html
|
||||
*/
|
||||
public static function MakeHtmlContent(string $sContent): Html
|
||||
{
|
||||
return new Html('<div class="ibo-is-html-content">'.$sContent.'</div>');
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<div class="ibo-is-html-content">{{ oUIBlock.GetHtml()|raw }}</div>
|
||||
{{ oUIBlock.GetHtml()|raw }}
|
||||
Reference in New Issue
Block a user