Debian Codegraph @

Embperl/Form/Control/info.pm

raw
1
2 ###################################################################################
3 #
4 # Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
5 # Embperl - Copyright (c) 2008-2014 Gerald Richter
6 #
7 # You may distribute under the terms of either the GNU General Public
8 # License or the Artistic License, as specified in the Perl README file.
9 #
10 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 #
14 # $Id$
15 #
16 ###################################################################################
17
18 package Embperl::Form::Control::info ;
19
20 use strict ;
21 use base 'Embperl::Form::Control' ;
22
23 use Embperl::Inline ;
24
25 1 ;
26
27 __EMBPERL__
28
29 [# ---------------------------------------------------------------------------
30 #
31 # show - output the control
32 #]
33
34 [$ sub show ($self, $req)
35
36 my $span = ($self->{width_percent});
37 my $state = $self -> {state} ;
38 $state =~ s/[^-a-zA-Z0-9_]/_/g ;
39 $]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +][+ ' '+][+ $state +]">
40 <tr>
41 <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$][+ $self -> {showtext}?($self->{text}):$self -> form -> convert_text ($self, undef, undef, $req) +]&nbsp;</td>
42 </tr>
43 </table>[$endsub$]
44
45
46 __END__
47
48 =pod
49
50 =head1 NAME
51
52 Embperl::Form::Control::blank - A info area inside an Embperl Form
53
54
55 =head1 SYNOPSIS
56
57 {
58 type => 'info',
59 text => 'blabla',
60 image => '/images/symbol.png'
61 }
62
63 =head1 DESCRIPTION
64
65 Used to create a info area with optional text inside an Embperl Form.
66 See Embperl::Form on how to specify parameters.
67
68 =head2 PARAMETER
69
70 =head3 type
71
72 Needs to be 'info'
73
74 =head3 text (optional)
75
76 Could be used to give a text that should be displayed inside the blank area
77
78 =head3 image (optional)
79
80 Add image to start of info area
81
82 =head3 class
83
84 css class
85
86 =head1 Author
87
88 G. Richter (richter at embperl dot org)
89
90 =head1 See Also
91
92 perl(1), Embperl, Embperl::Form
93
94