N°2847 - Alert & Panel: Improve factories, add color schemes, add visual tests

This commit is contained in:
Molkobain
2020-08-26 17:44:20 +02:00
parent 3b0ca9d771
commit 8bdaec0129
9 changed files with 317 additions and 38 deletions

View File

@@ -19,9 +19,6 @@
namespace Combodo\iTop\Application\UI\Component\Alert;
use Combodo\iTop\Application\UI\Component\Alert\Alert;
/**
* Class AlertFactory
*
@@ -45,6 +42,19 @@ class AlertFactory
return new Alert($sTitle, $sContent, Alert::ENUM_COLOR_NEUTRAL);
}
/**
* Make an Alert component for informational messages
*
* @param string $sTitle
* @param string $sContent The raw HTML content, must be already sanitized
*
* @return \Combodo\iTop\Application\UI\Component\Alert\Alert
*/
public static function MakeForInformation($sTitle, $sContent)
{
return new Alert($sTitle, $sContent, Alert::ENUM_COLOR_INFORMATION);
}
/**
* Make an Alert component for successful messages
*