Skip to content

Commit ef7146c

Browse files
committed
made size of textarea configurable
1 parent 9503405 commit ef7146c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

types/LongText.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class LongText extends AbstractMultiBaseType {
1010
protected $config = array(
1111
'prefix' => '',
1212
'postfix' => '',
13+
'rows' => '5',
14+
'cols' => '50'
1315
);
1416

1517

@@ -52,7 +54,9 @@ public function valueEditor($name, $rawvalue, $htmlID) {
5254
$params = array(
5355
'name' => $name,
5456
'class' => 'struct_'.strtolower($this->getClass()),
55-
'id' => $htmlID
57+
'id' => $htmlID,
58+
'rows' => $this->config['rows'],
59+
'cols' => $this->config['cols']
5660
);
5761
$attributes = buildAttributes($params, true);
5862

types/Wiki.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class Wiki extends AbstractBaseType {
99
protected $config = array(
1010
'prefix' => '',
1111
'postfix' => '',
12+
'rows' => '5',
13+
'cols' => '50'
1214
);
1315

1416
/**
@@ -50,7 +52,9 @@ public function valueEditor($name, $rawvalue, $htmlID) {
5052
$params = array(
5153
'name' => $name,
5254
'class' => 'struct_'.strtolower($this->getClass()),
53-
'id' => $htmlID
55+
'id' => $htmlID,
56+
'rows' => $this->config['rows'],
57+
'cols' => $this->config['cols']
5458
);
5559
$attributes = buildAttributes($params, true);
5660

0 commit comments

Comments
 (0)