Commit 7c2e8f87 authored by Florian Schlichting's avatar Florian Schlichting

Imported Upstream version 2.5.0

parent a06c7dd3
=pod
=head 2.5.0
=head 2.5.0 16. March 2014
- Do not clear old code before compiling a Embperl page
in Perl >= 5.14.x because it causes seg faults. This
......@@ -13,6 +13,17 @@
- Fixed a refcounting problem cause message "Attempt to
free unreferenced scalar" during mod_perl startup
with Perl 5.14.x
- Fix some dependencies on hash order inside the parser
which causes Embperl to fail with Perl >= 5.18 because
of hash randomisation.
- Changed the way exit passed through internaly, so it
works with Perl >= 5.18
- Adapted tests to Perl 5.18
- Adapted test httpd.conf to Apache 2.4. Embperl fully supports
Apache 2.4
- Makefile.PL now uses apache2 or httpd2 as Apache binary
- Makefile.PL now autodetects if mpm needs to loaded as
module for tests.
- Fix output inside of Registry script for mod_perl 2.0.4+
- Fix problem with error output on stderr for Windows 64Bit
- removed support for XALAN XML parser. It was outdated
......
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -11,7 +11,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: Cmd.xs 1382642 2012-09-10 05:33:29Z richter $
# $Id: Cmd.xs 1578075 2014-03-16 14:01:14Z richter $
#
###################################################################################
......
......@@ -31,7 +31,7 @@ static content out of dynamic pages and can sometime be helpful for testing.
If you have your own application and want to use Embperl's capbilities you can
do so by calling Embperl::Execute. This allows you to build your own application
logic and use Embperl possibilites for rendering content.
logic and use Embperl possibilities for rendering content.
=back
......@@ -748,7 +748,7 @@ Session Handling
Set the secure flag of cookie that Embperl uses for the session id. If set the
cookie will only be transfered over a secured connection.
cookie will only be transferred over a secured connection.
=head2 Embperl_Log
......
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -11,7 +11,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: DOM.xs 1382642 2012-09-10 05:33:29Z richter $
# $Id: DOM.xs 1578075 2014-03-16 14:01:14Z richter $
#
###################################################################################
......
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -11,7 +11,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: Embperl.pm 1432267 2013-01-11 20:27:37Z richter $
# $Id: Embperl.pm 1578075 2014-03-16 14:01:14Z richter $
#
###################################################################################
......@@ -50,7 +50,7 @@ use vars qw(
@ISA = qw(Exporter DynaLoader);
$VERSION = '2.5.0_4' ;
$VERSION = '2.5.0' ;
if ($modperl = $ENV{MOD_PERL})
......@@ -319,7 +319,7 @@ sub get_multipart_formdata
foreach ( @$ffld )
{
# the param_fetch needs CGI.pm 2.43
$params = $cgi->param_fetch( $_ ) ;
$params = $cgi->param_fetch( -name => $_ ) ;
#$params = $cgi->{$_} ;
if ($#$params > 0)
{
......
......@@ -1267,7 +1267,7 @@ without the need to reparse/recompile it over and over again.
Another nice thing about recipes is that they are not static. A recipe
is defined by a recipe object. When a request comes in, Embperl calls
the get_recipe method of teh application object, which by default
the get_recipe method of the application object, which by default
calls the get_recipe of the named recipe object, which should return a array
that describes what Embperl has to do. The get_recipe methods can of course
build the array dynamically, looking, for example, at the request parameters
......@@ -1646,33 +1646,17 @@ performance.
None known.
Under perl5.004 there are memory leaks. This is not an Embperl bug,
but can cause your httpd to grow endlessly when running under
mod_perl. Please upgrade to perl5.004_04 to fix this. You should
also upgrade to a mod_perl version higher than 1.07_01 as soon as
possible, because until 1.07_01 there is a memory leak in
Apache->push_handler.
=head1 Compatibility
I have tested Embperl successfully
=head2 on Linux 2.x with
=head2 on Linux 2.x/3.x with
=over 4
=item perl5.004_04
=item perl5.005_03
=item perl5.6.0
=item perl5.6.1
=item perl5.8.5
=item perl5.005_03, 5.6.x, 5.8.x, 5.10.x, 5.12.x, 5.14.x, 5.16.x, 5.18.x
=item apache_1.3.0 - apache_1.3.31, apache 2.0.50
=item apache_1.3.0 - apache_1.3.31, apache 2.0.x, apache 2.2.x, apache 2.4.x
=item apache_ssl (Ben SSL)
......
/*###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -11,7 +11,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: App.pm 1382642 2012-09-10 05:33:29Z richter $
# $Id: App.pm 1578075 2014-03-16 14:01:14Z richter $
#
###################################################################################
......
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -11,7 +11,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: Constant.pm 1382642 2012-09-10 05:33:29Z richter $
# $Id: Constant.pm 1578075 2014-03-16 14:01:14Z richter $
#
###################################################################################
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -89,7 +89,23 @@ sub is_disabled
my $disable = $self -> {disable} || $req -> {form_options_masks}{$self->{name}}{disable} || $req -> {form_options_masks}{'*'}{disable} ;
$disable = &{$disable}($self, $req) if (ref ($disable) eq 'CODE') ;
return $disable ;
}
# ---------------------------------------------------------------------------
#
# is_blanked - display this control as blank field
#
sub is_blanked
{
my ($self, $req) = @_ ;
my $disable = $self -> {blank} || $req -> {form_options_masks}{$self->{name}}{blank} || $req -> {form_options_masks}{'*'}{blank} ;
$disable = &{$disable}($self, $req) if (ref ($disable) eq 'CODE') ;
return $disable ;
}
......@@ -103,10 +119,23 @@ sub is_readonly
{
my ($self, $req) = @_ ;
my $redaonly = $self -> {readonly} || $req -> {form_options_masks}{$self->{name}}{readonly} || $req -> {form_options_masks}{'*'}{readonly} ;
$redaonly = &{$redaonly}($req) if (ref ($redaonly) eq 'CODE') ;
return $redaonly ;
my $readonly = $self -> {readonly} || $req -> {form_options_masks}{$self->{name}}{readonly} || $req -> {form_options_masks}{'*'}{readonly} ;
$readonly = &{$readonly}($req) if (ref ($readonly) eq 'CODE') ;
return $readonly ;
}
# ---------------------------------------------------------------------------
#
# is_with_id - returns true if the control shows something that has an internal id
#
sub is_with_id
{
my ($self, $req) = @_ ;
return 0 ;
}
# ---------------------------------------------------------------------------
......@@ -132,7 +161,7 @@ sub has_code_refs
{
my ($self, $req) = @_ ;
return ref ($self -> {readonly}) eq 'CODE' || ref ($self -> {disable}) eq 'CODE' ;
return ref ($self -> {readonly}) eq 'CODE' || ref ($self -> {disable}) eq 'CODE' || ref ($self -> {blank}) eq 'CODE' ;
}
......@@ -146,9 +175,22 @@ sub code_ref_fingerprint
{
my ($self, $req) = @_ ;
return $self -> is_readonly?'R':'W' . $self -> is_disabled?'D':'E' ;
return ($self -> is_readonly($req)?'R':'W') . ($self -> is_disabled($req)?'D':'E') . ($self -> is_blanked($req)?'B':'S') ;
}
# ---------------------------------------------------------------------------
#
# constrain_attrs - returns attrs that might change the form layout
# if there value changes
#
sub constrain_attrs
{
my ($self, $req) = @_ ;
return () ;
}
# ---------------------------------------------------------------------------
#
......@@ -247,12 +289,14 @@ sub get_id_for_control
sub label_text
{
my ($self) = @_ ;
my ($self, $req) = @_ ;
my $key = 'label_text' . ($req -> {form_options}{language_fingerprint} || $req -> {form_options}{language}) ;
return $self -> {label_text} if ($self -> {label_text}) ;
return $self -> {$key} if ($self -> {$key}) ;
return $self -> {label_text} = $self -> {showtext}?($self->{text} ||
$self->{name}):$self -> form -> convert_label ($self) ;
return $self -> {$key} = $self -> {showtext}?($self->{text} ||
$self->{name}):$self -> form -> convert_label ($self, undef, undef, $req) ;
}
......@@ -284,7 +328,7 @@ sub get_validate_rules
if ($self -> {validate})
{
@local_rules = ( -key => $self->{name} );
push @local_rules, -name => $self -> label_text ;
push @local_rules, -name => $self -> label_text ($req);
push @local_rules, @{$self -> {validate}};
}
else
......@@ -293,13 +337,38 @@ sub get_validate_rules
if ($auto)
{
@local_rules = ( -key => $self->{name} );
push @local_rules, -name => $self -> label_text ;
push @local_rules, -name => $self -> label_text ($req) ;
push @local_rules, @{$auto};
}
}
return \@local_rules ;
}
# ---------------------------------------------------------------------------
#
# has_validate_rules - check if there is anything to validate and
# create auto rules
#
sub has_validate_rules
{
my ($self, $req) = @_ ;
if ($self -> {validate})
{
return scalar(@{$self -> {validate}}) ;
}
my $auto = $self -> get_validate_auto_rules ($req) ;
if ($auto)
{
$self -> {validate} = $auto ;
return scalar(@$auto) ;
}
$self -> {validate} = [] ;
return 0 ;
}
# ---------------------------------------------------------------------------
#
# has_auto_label_size - returns true if label should be auto sized for this control
......@@ -322,8 +391,10 @@ sub get_value
my ($self, $req) = @_ ;
my $fdat = $req -> {docdata} || \%Embperl::fdat ;
my $name = $self -> {name} ;
my $name = $self -> {srcname} || $self -> {force_name} || $self -> {name} ;
return $fdat -> {$name} ;
my $dataprefix = $self -> {dataprefix} ;
return $fdat -> {$name} if (!$dataprefix) ;
foreach my $prefix (@$dataprefix)
......@@ -354,11 +425,39 @@ sub get_std_control_attr
my $events = $self -> {eventattrs} ;
$type ||= $self -> {type} ;
my $state = $self -> {state} ;
$state =~ s/[^-a-zA-Z0-9_]/_/g ;
my $attrs = qq{class="ef-control ef-control-width-$width ef-control-$type ef-control-$type-width-$width $addclass $class $state" id="$ctrlid" $events} ;
return wantarray?($attrs, $ctrlid, $name):$attrs ;
}
# ------------------------------------------------------------------------------------------
#
# get_display_text - returns the text that should be displayed
#
sub get_display_text
{
my ($self, $req, $value) = @_ ;
$value = $self -> get_value ($req) if (!defined ($value)) ;
return $value ;
}
# ---------------------------------------------------------------------------
#
# get_id_from_value - returns id for a given value
#
sub get_id_from_value
{
#my ($self, $value) = @_ ;
return ;
}
1 ;
......@@ -382,10 +481,12 @@ my $span = 0 ;
$]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +] ef-element-[+ $self -> {type} +] [+ $self -> {state} +]">
<tr>
[-
[$ if ($self -> is_blanked ($req)) $]
<td class="ef-label-box ef-label-box-width-100"> </td>
[$else$][-
$span += $self -> show_label_cell ($req, $span);
$self -> show_control_cell ($req, $span) ;
-]
-][$endif$]
</tr>
</table>[$
endsub $]
......@@ -420,11 +521,11 @@ $]
if ($self -> {showoptionslabel})
{
my $opts = $self -> form -> convert_options ($self, [$self -> {value}]) ;
my $opts = $self -> form -> convert_options ($self, [$self -> {value}], undef, $req) ;
$self -> {text} = $opts -> [0] ;
$self -> {showtext} = 1 ;
}
-][+ $self -> label_text +][$endsub$]
-][+ $self -> label_text ($req) +][$endsub$]
[# ---------------------------------------------------------------------------
#
......@@ -473,11 +574,44 @@ $]
[$ sub show_control_readonly ($self, $req, $value)
$value = $self -> {value} || $fdat{$self -> {name}} if (!defined($value)) ;
my $text = $self -> get_display_text ($req, $value) ;
my $name = $self -> {force_name} || $self -> {name} ;
$]
<div [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req, '', 'readonly') } +] _ef_divname="[+$self -> {name}+]">[+ $value +]</div>
<div [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req, '', 'readonly') } +] _ef_divname="[+ $name +]">[+ $text +]</div>
[$ if $self->{hidden} $]
<input type="hidden" name="[+ $name +]" value="[+ $value +]">
[$endif$]
[$endsub$]
[# ---------------------------------------------------------------------------
#
# show_control_readonly_array - output the control as readonly, multiple
# times in case of array
#]
[!
sub show_control_readonly_array
{
my ($self, $req, $value) = @_ ;
$value = $self -> get_value ($req) if (!defined ($value)) ;
if (ref ($value) eq 'ARRAY')
{
foreach my $subval (@$value)
{
$self -> show_control_readonly ($req, defined ($subval)?$subval:'') ;
}
}
else
{
$self -> show_control_readonly ($req, $value) ;
}
}
!]
[# ---------------------------------------------------------------------------
#
# show_control_addons - output additional things after the control
......@@ -499,8 +633,8 @@ $]
$]
<td class="ef-control-box [+ $addclass +]">
[*
my @ret = $ro?$self -> show_control_readonly($req):$self -> show_control ($req);
$self -> show_control_addons ($req) ;
my @ret = $ro?$self -> show_control_readonly_array($req):$self -> show_control ($req);
$self -> show_control_addons ($req) ;
*]
</td>
[* return @ret ; *]
......
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -38,7 +38,7 @@ sub new
bless $self, $class ;
$self -> {removesource} ||= 0 ;
$self -> form -> add_code_at_bottom("addremoveInitOptions (document.getElementById('$self->{src}'), document.getElementById('$self->{dest}'), document.getElementById('$self->{name}'), $self->{removesource})") ;
$self -> form -> add_code_at_bottom("ef_addremoveInitOptions (document, document.getElementsByName('$self->{src}')[0], document.getElementsByName('$self->{dest}')[0], document.getElementsByName('$self->{name}')[0], $self->{removesource})") ;
return $self ;
}
......@@ -48,29 +48,26 @@ sub new
__EMBPERL__
[# ---------------------------------------------------------------------------
#
# show - output the control
#]
[$ sub show ($self)
my $span = $self->{width_percent} ;
my $name = $self->{name} ;
my $nsprefix = $self -> form -> {jsnamespace} ;
[$ sub show ($self, $req)
$]
my $name = $self -> {name} ;
<td class="cBase cControlBox cControlAddRemoveBox" colspan="[+ $span +]">
$]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +] ef-element-[+ $self -> {type} +] [+ ' ' . $self -> {state} +]">
<tr>
<td class="cBase cControlBox cControlAddRemoveBox">
<input type="hidden" id="[+ $name +]" name="[+ $name +]">
<img src="[+ $self -> {imagedir} +]/toleft.gif" title="Hinzufgen" onClick="[+ $nsprefix +]addremoveAddOption (document, document.getElementById('[+ $self->{src} +]'), document.getElementById('[+ $self->{dest} +]'), document.getElementById('[+ $name +]'), [+ $self->{removesource} +])">
<img src="[+ $self -> {imagedir} +]/toright.gif" title="Entfernen" onClick="[+ $nsprefix +]addremoveRemoveOption (document, document.getElementById('[+ $self->{src} +]'), document.getElementById('[+ $self->{dest} +]'), document.getElementById('[+ $name +]'), [+ $self->{removesource} +])">
<img src="[+ $self -> {imagedir} +]/toleft.gif" title="Hinzufgen" onClick="ef_addremoveAddOption (document, document.getElementsByName('[+ $self->{src} +]')[0], document.getElementsByName('[+ $self->{dest} +]')[0], document.getElementsByName('[+ $name +]')[0], [+ $self->{removesource} +])">
<img src="[+ $self -> {imagedir} +]/toright.gif" title="Entfernen" onClick="ef_addremoveRemoveOption (document, document.getElementsByName('[+ $self->{src} +]')[0], document.getElementsByName('[+ $self->{dest} +]')[0], document.getElementsByName('[+ $name +]')[0], [+ $self->{removesource} +])">
[#
print "<input class="cStandardButton" type=button value="Hinzufgen" onClick="[+ $nsprefix +]addremoveAddOption (document, this.form.elements['$self->{src}'], this.form.elements['$self->{dest}'], this.form.elements['$self->{name}'], $self->{removesource})">\n" ;
print "<input class="cStandardButton" type=button value="Entfernen" onClick="[+ $nsprefix +]addremoveRemoveOption (document, this.form.elements['$self->{src}'], this.form.elements['$self->{dest}'], this.form.elements['$self->{name}'], $self->{removesource})">\n" ;
#]
</td>
</tr>
</table>
[$endsub$]
__END__
......
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -47,12 +47,12 @@ sub init
sub init_data
{
my ($self, $req, $parentctrl) = @_ ;
my ($self, $req, $parentctrl, $force) = @_ ;
my $fdat = $req -> {docdata} || \%fdat ;
my $name = $self->{name} ;
my $val = $fdat->{$name} ;
return if ($val eq '' || $req -> {"ef_age_init_done_$name"}) ;
return if ($val eq '' || ($req -> {"ef_age_init_done_$name"} && !$force)) ;
#20060914041444Z
my ($year, $mon, $mday, $hour, $min, $sec, $tz) = ($val =~ /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(.)$/) ;
......@@ -64,6 +64,7 @@ sub init_data
$year2,$mon2,$mday2, $hour2,$min2,$sec2) } ;
$fdat->{$name} = $Dd > 0?"${Dd}Tage":sprintf ('%d:%02dh', $Dh, $Dm) ;
$fdat->{'_tt_' . $name} = sprintf('%d.%02d.%04d %d:%02d', $mday, $mon, $year, $hour, $min) ;
$req -> {"ef_age_init_done_$name"} = 1 ;
}
......
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -31,15 +31,15 @@ __EMBPERL__
# show - output the control
#]
[$ sub show ($self, $data)
[$ sub show ($self, $req)
my $state = $self -> {state} ;
$]<table class="[+ $state +] ef-element ef-element-width-[+ $self -> {width_percent} +]">
$]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +] ef-element-[+ $self -> {type} || 'blank' +] [+ ' ' . $self -> {state} +]">
<tr>
<td class="ef-label-box">[+ $self->{text} +]</td>
[#<td class="ef-label-box ef-label-box-width-100">[+ $self->{text} +]</td>#]
<td class="ef-control-box ef-control-box-width-100">[+ $self->{text} +]</td>
</tr>
</table>[$endsub$]
</table>[$endsub$]
__END__
......
......@@ -2,7 +2,7 @@
###################################################################################
#
# Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
# Embperl - Copyright (c) 2008-2012 Gerald Richter
# Embperl - Copyright (c) 2008-2014 Gerald Richter
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
......@@ -31,27 +31,27 @@ __EMBPERL__
# show - output the control
#]
[$ sub show ($self, $data)
[$ sub show ($self, $req)
my $span = ($self->{width_percent}) ;
$self->{button} ||= [{}] ;
my $state = $self -> {state} ;
$]
<td class="cBase cControlBox cControlButtonBox" colspan="[+ $span +] [+ $state +]">
$]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +] ef-element-[+ $self -> {type} +] [+ $self -> {state} +]">
<tr> <td class="ui-label-box" >
[$ foreach my $button (@{$self->{button}}) $]
[$if $self -> {symbol} $]
<div class="cControlButtonDiv"
title="[+ $self -> {showtext}?($self->{text}):$self -> form -> convert_label ($self) +]"
title="[+ $self -> {showtext}?($self->{text}):$self -> form -> convert_label ($self, undef, undef, $req) +]"
[$if $self -> {onclick} $] onClick="[+ do { local $escmode = 0 ; $self -> {onclick} } +]" [$endif$]
[+ do { local $escmode = 0 ; $self -> {eventattrs} } +]><img class="cControlButtonSymbol" src="[+ $self -> {symbol} +]">
[+ $self -> {showvalue}?($self -> {value} || $self->{text}):$self -> form -> convert_label ($self) +]
[+ $self -> {showvalue}?($self -> {value} || $self->{text}):$self -> form -> convert_label ($self, undef, undef, $req) +]
</div>
[$else$]
[# Workaround around segfault in Embperl 2.1.1-dev *grmpf* #]
<[# #]input
class="cBase cControl cControlButton" name="[+ $self->{name} +]"
value="[+ $self -> {showvalue}?($self -> {value} || $self->{text}):$self -> form -> convert_label ($self) +]"
title="[+ $self -> {showtext}?($self->{text}):$self -> form -> convert_label ($self) +]"
value="[+ $self -> {showvalue}?($self -> {value} || $self->{text}):$self -> form -> convert_label ($self, undef, undef, $req) +]"
title="[+ $self -> {showtext}?($self->{text}):$self -> form -> convert_label ($self, undef, undef, $req) +]"
[$if $self -> {onclick} $] onClick="[+ do { local $escmode = 0 ; $self -> {onclick} } +]" [$endif$]
[+ do { local $escmode = 0 ; $self -> {eventattrs} } +]
[$if $self -> {image} $]
......@@ -71,8 +71,8 @@ $]
[$endif$]
[$ endforeach $]
</td>
[$endsub$]
</td></tr>
</table>[$endsub$]