Skip to content
Permalink
Browse files

Changing the default layout to use FlashComponent::render instead of …

…the deprecated SessionComponent::flash. Changing the flash elements to retain the id attribute that was previously present. Also fixing file permissions on the template files I added.
  • Loading branch information...
mattmemmesheimer committed Aug 21, 2015
1 parent 7d5e6e3 commit 70feb52f73861ed3177b8eda0a957c375f811170
@@ -42,7 +42,7 @@ $cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
</div>
<div id="content">

<?php echo $this->Session->flash(); ?>
<?php echo $this->Flash->render(); ?>

<?php echo $this->fetch('content'); ?>
</div>
@@ -4,4 +4,4 @@ if (!empty($params['class'])) {
$class .= ' ' . $params['class'];
}
?>
<div class="<?= h($class) ?>"><?= h($message) ?></div>
<div id="<?= $key ?>Message" class="<?= h($class) ?>"><?= h($message) ?></div>
@@ -1 +1 @@
<div class="message error"><?= h($message) ?></div>
<div id="<?= $key ?>Message" class="message error"><?= h($message) ?></div>
@@ -1 +1 @@
<div class="message success"><?= h($message) ?></div>
<div id="<?= $key ?>Message" class="message success"><?= h($message) ?></div>
@@ -84,6 +84,7 @@ public function render($key = 'flash', $options = array()) {
$flash = $options + $flash;
CakeSession::delete("Message.$key");
$flash['key'] = $key;
return $this->_View->element($flash['element'], $flash);
}

0 comments on commit 70feb52

Please sign in to comment.
You can’t perform that action at this time.