An OOUI ProcessDialog `Process` can be an 'error' or 'warning', depending on the config of the Error returned in `getActionProcess()`:
| Code | Current | Suggested
| `new OO.ui.Error( 'This is an error.', { warning: false } );` | {F59029236}
| `new OO.ui.Error( 'This is a warning.', { warning: true } );` | {F59029245} | {F59029268}
The latter should use a warning icon and be orange.
SSCE for demoing this:
```lang=js
function WarningDialog() {
WarningDialog.super.call( this );
}
OO.inheritClass( WarningDialog, OO.ui.ProcessDialog );
WarningDialog.static.name = 'WarningDialog';
WarningDialog.static.title = 'Warning dialog';
WarningDialog.static.actions = [ { action: 'cancel', label: 'Cancel', flags: 'safe' } ];
WarningDialog.prototype.getActionProcess = function ( action ) {
return WarningDialog.super.prototype.getActionProcess.call( this, action )
.next( () => {
return new OO.ui.Error( 'This is a warning.', { warning: true } );
} );
};
WarningDialog.prototype.getBodyHeight = function () {
return 300;
};
const windowManager = OO.ui.getWindowManager();
windowManager.addWindows( [ new WarningDialog() ] );
windowManager.openWindow( 'WarningDialog' );
```