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

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 31 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::info ;
20  
21 use strict ;
22 use base 'Embperl::Form::Control' ;
23  
24 use Embperl::Inline ;
25  
26 1 ;
27  
28 __EMBPERL__
29
30 [# ---------------------------------------------------------------------------
31 #
32 # show - output the control
33 #]
34  
35 [$ sub show ($self, $req)
36  
37 my $span = ($self->{width_percent});
38 my $state = $self -> {state} ;
39 $state =~ s/[^-a-zA-Z0-9_]/_/g ;
40 my $srctext = $self -> {showtext}?($self->{text}):$self -> form -> convert_text ($self, undef, undef, $req) ;
41 my @text = split /\n/, $srctext ;
42  
43 $]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +][+ ' '+][+ $state +]">
44 <tr>
45 <td [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req, undef, 'readonly', 'ef-control-info') } +] >[$ if $self -> {image} $]<img class="cControlButtonSymbol" src="[+ $self -> {image} +]">[$endif$]
46 [+ shift @text +][$ foreach my $val (@text) $]<br>[+ $val +][$endforeach$]&nbsp;</td>
47 </tr>
48 </table>[$endsub$]
49  
50  
51 __END__