You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
932B

  1. <?php
  2. use yii\helpers\Html;
  3. ?>
  4. <?php if($display && $message): ?>
  5. <div class="alert alert-<?= $type ?>">
  6. <?php if($title): ?>
  7. <h4>
  8. <?php if($icon): ?>
  9. <i class="icon fa fa-<?= $icon ?>"></i>
  10. <?php endif; ?>
  11. <?= $title ?>
  12. </h4>
  13. <?php endif; ?>
  14. <p>
  15. <?php if(!$title && $icon): ?>
  16. <i class="icon fa fa-<?= $icon ?>"></i>
  17. <?php endif; ?>
  18. <?php if(is_array($message)): ?>
  19. <?php foreach($message as $key => $mess): ?>
  20. <?= nl2br(Html::encode($mess)); ?>
  21. <?php if($key !== array_key_last($message)): ?><br /><?php endif; ?>
  22. <?php endforeach; ?>
  23. <?php else: ?>
  24. <?= nl2br(Html::encode($message)); ?>
  25. <?php endif; ?>
  26. </p>
  27. </div>
  28. <?php endif; ?>