Browse Source

CSS Class assignment corrected.

Used ```Html::addCssClass``` and ```Html::removeCssClass``` more effectively.
tags/2.0.0-beta
Kartik Visweswaran 11 years ago
parent
commit
affa9589dc
  1. 3
      apps/advanced/frontend/widgets/Alert.php

3
apps/advanced/frontend/widgets/Alert.php

@ -44,12 +44,13 @@ class Alert extends Widget
foreach ($flashes as $type => $message) {
if (in_array($type, $this->allowedTypes)) {
$class = ($type === 'error') ? 'alert-danger' : 'alert-' . $type;
$this->options['class'] = $class;
Html::addCssClass($this->options, $class);
echo BsAlert::widget([
'body' => $message,
'closeButton' => $this->closeButton,
'options' => $this->options
]);
Html::removeCssClass($this->options, $class);
$session->removeFlash($type);
$this->_doNotRender = false;
}

Loading…
Cancel
Save