blib/lib/Embperl/Form/Control/inputlist.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond 0.0% 0 / 11 MC/DCmcdc 0.0% 0 / 7 Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 46 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 ###################################################################################
3 #
4 # Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
5 # Embperl - Copyright (c) 2008-2015 Gerald Richter
6 # Embperl - Copyright (c) 2015-2023 actevy.io
7 #
8 # You may distribute under the terms of either the GNU General Public
9 # License or the Artistic License, as specified in the Perl README file.
10 #
11 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
12 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
13 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
14 #
15 # $Id$
16 #
17 ###################################################################################
18  
19 package Embperl::Form::Control::inputlist ;
20  
21 use strict ;
22 use base 'Embperl::Form::Control' ;
23  
24 use Embperl::Inline ;
25  
26 use vars qw{%fdat} ;
27  
28 1 ;
29  
30 __EMBPERL__
31
32 [# ---------------------------------------------------------------------------
33 #
34 # show_control - output the control
35 #]
36  
37 [$ sub show_control ($self, $req)
38  
39 my $class = $self -> {class} ;
40 my $fields = $self -> {fields} ;
41 my $sep = $self -> {separator} || $self -> {seperator};
42 $sep ||= ' ';
43 my $i = 0;
44 $] 
45 [$ while ($i < @$fields) $][-
46 $size = $fields->[$i]{size} ; $size ||= $self->{size} ;
47 $style = $fields->[$i]{textstyle} ; $style ||= $self->{textstyle} ;
48 -]<span class="ef-control-inputlist-text" style="[+ $style +]">[+ $self -> form -> convert_label ($self, $fields->[$i]{name}, undef, $req) +]</span> <input type="text" name="[+ $fields->[$i]{name} +]" [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req) } +]
49 [$if $size $]size="[+ $size +]" maxlength="[+$size+]" [$endif$]
50 [+ do { local $escmode = 0 ; $self -> {eventattrs} } +]>[+ ($i +1) < @$fields?$sep:'' +]
51 [- $i++ -]
52 [$endwhile$]
53 [$endsub$]
54  
55 __END__