mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 12:08:47 +02:00
N°2847 - Alert & Panel: Improve factories, add color schemes, add visual tests
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user