Permalink
Browse files

Add hiddenblock to the default templates and use it.

  • Loading branch information...
markstory committed Feb 11, 2014
1 parent 216a2b4 commit 75afc677a8a06aa81e4831b9b35605e177d8aba1
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/View/Helper/FormHelper.php
@@ -162,6 +162,7 @@ class FormHelper extends Helper {
protected $_defaultTemplates = [
'formstart' => '<form{{attrs}}>',
'formend' => '</form>',
+ 'hiddenblock' => '<div style="display:none;">{{content}}</div>',
];
/**
@@ -368,9 +369,9 @@ public function create($model = null, $options = []) {
}
if (!empty($append)) {
- $append = $this->Html->useTag('hiddenblock', $append);
+ $append = $this->formatTemplate('hiddenblock', ['content' => $append]);
}
- return $this->_templater->format('formstart', [
+ return $this->formatTemplate('formstart', [
'attrs' => $this->_templater->formatAttributes($htmlAttributes)
]) . $append;
}

0 comments on commit 75afc67

Please sign in to comment.