* '''Written:''' <> by MatthewPaulThomas The Launchpad Web app now supports four kinds of alert messages: error messages, warning messages, informational messages, and debugging data. `AddForm`, `EditForm`, and `GeneralForm` use these automatically, but sometimes you'll have to use them yourself (instead of the old `portalError` and `portalMessage` CSS classes). == How to roll your own alerts == || {X} ||`

` <
> The action you asked for didn't succeed.|| || /!\ ||`

` <
> You're in danger of losing significant time, work, or privacy (perhaps by inattention or a possible mistake).|| || {i} ||`

` <
> Something unusual but not dangerous has happened, such as successfully creating something.|| || {i} ||`

` <
> This should never appear in production.|| If you want to highlight a form field with an error message underneath, use the classes separately. || '''`

`''' <
> [__Here's a form field with an error in it.__] <
> {X} '''`
` There is no product with that name.'''|| == Testing that you've used the correct alert style == When you write tests for a page containing an alert message, include the type of alert in the expected output. For example: {{{ ...error message... ...There is no product with that name. }}} {{{ ...warning message... ...There is no branch with that name. Continuing will register this branch automatically. }}} {{{ ...informational message... ...Thank you for your bug report! }}}