Revision cbd9fcfa
Von Sven Schöling vor mehr als 10 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
344 | 344 |
sub areainput_tag { |
345 | 345 |
my ($self, $name, $value, %attributes) = _hashify(3, @_); |
346 | 346 |
|
347 |
my ($rows, $cols); |
|
348 |
my $min = delete $attributes{min_rows} || 1; |
|
349 |
|
|
350 |
if (exists $attributes{cols}) { |
|
351 |
$cols = delete $attributes{cols}; |
|
352 |
$rows = $::form->numtextrows($value, $cols); |
|
353 |
} else { |
|
354 |
$rows = delete $attributes{rows} || 1; |
|
355 |
} |
|
347 |
my $cols = delete $attributes{cols} || delete $attributes{size}; |
|
348 |
my $minrows = delete $attributes{min_rows} || 1; |
|
349 |
my $maxrows = delete $attributes{max_rows}; |
|
350 |
my $rows = $::form->numtextrows($value, $cols, $maxrows, $minrows); |
|
356 | 351 |
|
357 | 352 |
return $rows > 1 |
358 |
? $self->textarea_tag($name, $value, %attributes, rows => max($rows, $min), ($cols ? (cols => $cols) : ()))
|
|
359 |
: $self->input_tag($name, $value, %attributes, ($cols ? (size => $cols) : ()));
|
|
353 |
? $self->textarea_tag($name, $value, %attributes, rows => $rows, cols => $cols)
|
|
354 |
: $self->input_tag($name, $value, %attributes, size => $cols);
|
|
360 | 355 |
} |
361 | 356 |
|
362 | 357 |
sub multiselect2side { |
Auch abrufbar als: Unified diff
areainput implementierung von cetaq übernommen