QBit/WebInterface/Controller/Form/Field/textarea.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 31 CC 2 SCAR 12.8
CC
2
Cov
0%
control_html
6.0
init
2.0
BEGIN
2.0
CRAP 3.6
1 package QBit::WebInterface::Controller::Form::Field::textarea;
2 $QBit::WebInterface::Controller::Form::Field::textarea::VERSION = '0.033';
3 use qbit;
4  
5 use base qw(QBit::WebInterface::Controller::Form::Field);
6  
7 sub init {
8 my ($self) = @_;
9  
10 $self->SUPER::init();
11  
12 $self->{'rows'} ||= 8;
13 }
14  
15 sub control_html {
16 my ($self) = @_;
17  
18 my $html = '<textarea';
19  
20 $html .= $self->_class('span9');
21  
22 foreach (qw(id name style cols rows)) {
23 $html .= " $_=\"" . html_encode($self->{$_}) . '"' if defined($self->{$_});
24 }
25  
26 $html .= '>' . html_encode($self->value);
27  
28 $html .= '</textarea>';
29  
30 $html .= $self->_html_error();
31  
32 return $html;
33 }
34  
35 TRUE;