Skip to content
Snippets Groups Projects
Commit 68ba2c64 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #194 from greezybacon/issue/191


forms: Unless specified, limitless input in long answers

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 523ddc13 47469a9c
No related branches found
No related tags found
No related merge requests found
......@@ -503,7 +503,7 @@ class TextareaField extends FormField {
'rows' => new TextboxField(array(
'id'=>2, 'label'=>'Height (rows)', 'required'=>false, 'default'=>4)),
'length' => new TextboxField(array(
'id'=>3, 'label'=>'Max Length', 'required'=>false, 'default'=>30)),
'id'=>3, 'label'=>'Max Length', 'required'=>false, 'default'=>0)),
'html' => new BooleanField(array(
'id'=>4, 'label'=>'HTML', 'required'=>false, 'default'=>true,
'configuration'=>array('desc'=>'Allow HTML input in this box'))),
......@@ -861,7 +861,7 @@ class TextareaWidget extends Widget {
$rows = "rows=\"{$config['rows']}\"";
if (isset($config['cols']))
$cols = "cols=\"{$config['cols']}\"";
if (isset($config['length']))
if (isset($config['length']) && $config['length'])
$maxlength = "maxlength=\"{$config['length']}\"";
if (isset($config['html']) && $config['html'])
$class = 'class="richtext no-bar small"';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment