Enabled supression of wysihtml5()

This commit is contained in:
Deon George 2013-09-04 22:51:01 +10:00
parent 9eb699d50e
commit d3627ace8f

View File

@ -89,9 +89,12 @@ abstract class lnApp_Form extends Kohana_Form {
if (! isset($attributes['id'])) if (! isset($attributes['id']))
$attributes['id'] = preg_replace('/[\[\]]/','_',$name); $attributes['id'] = preg_replace('/[\[\]]/','_',$name);
Script::factory() if (! isset($attributes['nowysihtml']))
->type('stdin') Script::factory()
->data('$("#'.$attributes['id'].'").wysihtml5();'); ->type('stdin')
->data('$("#'.$attributes['id'].'").wysihtml5();');
else
unset($attributes['wysihtml']);
return sprintf(static::_controlgroup($name,$attributes),parent::textarea($name,$body,$attributes,$double_encode)); return sprintf(static::_controlgroup($name,$attributes),parent::textarea($name,$body,$attributes,$double_encode));
} }