| 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::label ; |
| 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 |
$]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +] ef-element-[+ $self -> {type} || 'blank' +] [+ ' ' . $self -> {state} +]"> |
| 37 |
<tr> |
| 38 |
<td class="ef-label-box ef-label-box-width-100">[$ if $self -> {controlclass} $]<span class="[+$self->{controlclass}+]">[+ $self->{text} +]</span>[$else$][+ $self->{text} +][$endif$]</td> |
| 39 |
[#<td class="ef-control-box ef-control-box-width-100">[+ $self->{text} +]</td>#] |
| 40 |
</tr> |
| 41 |
</table>[$endsub$] |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
__END__ |
| 46 |
|
| 47 |
=pod |
| 48 |
|
| 49 |
=head1 NAME |
| 50 |
|
| 51 |
Embperl::Form::Control::label - A label area inside an Embperl Form |
| 52 |
|
| 53 |
|
| 54 |
=head1 SYNOPSIS |
| 55 |
|
| 56 |
{ |
| 57 |
type => 'label', |
| 58 |
text => 'blabla' |
| 59 |
} |
| 60 |
|
| 61 |
=head1 DESCRIPTION |
| 62 |
|
| 63 |
Used to create a label area with optional text inside an Embperl Form. |
| 64 |
See Embperl::Form on how to specify parameters. |
| 65 |
|
| 66 |
=head2 PARAMETER |
| 67 |
|
| 68 |
=head3 type |
| 69 |
|
| 70 |
Needs to be 'label' |
| 71 |
|
| 72 |
=head3 text (optional) |
| 73 |
|
| 74 |
Could be used to give a text that should be displayed inside the blank area |
| 75 |
|
| 76 |
|
| 77 |
=head1 Author |
| 78 |
|
| 79 |
G. Richter (richter at embperl dot org) |
| 80 |
|
| 81 |
=head1 See Also |
| 82 |
|
| 83 |
perl(1), Embperl, Embperl::Form |
| 84 |
|
| 85 |
|