mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Added validation check to areaTag() with patch from Ticket #54 submitted by bgmccollum.
Note this will not work with the current Blog tutorial. https://trac.cakephp.org/wiki/Cake/Tutorials/BlogPosts We will update the tutorial with this change in next release. Closes #54 Thanks bgmccollum git-svn-id: https://svn.cakephp.org/repo/trunk/cake@335 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
24c9c0478f
commit
7791b8dcfe
1 changed files with 10 additions and 7 deletions
|
@ -297,10 +297,13 @@ class HtmlHelper
|
|||
*/
|
||||
function areaTag($tag_name, $cols=60, $rows=10, $html_options=null)
|
||||
{
|
||||
$value = empty($html_options['value'])? $this->tagValue($tag_name): empty($html_options['value']);
|
||||
$elements = explode("/", $tag_name);
|
||||
|
||||
$value = empty($html_options['value'])? $this->tagValue($elements[1]): empty($html_options['value']);
|
||||
$html_options['cols'] = $cols;
|
||||
$html_options['rows'] = $rows;
|
||||
return sprintf(TAG_AREA, $tag_name, $this->parseHtmlOptions($html_options, null, ' '), $value);
|
||||
$this->tagIsInvalid($elements[0],$elements[1])? $html_options['class'] = 'form_error': null;
|
||||
return sprintf(TAG_AREA, $elements[1], $this->parseHtmlOptions($html_options, null, ' '), $value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue