Commit cc919829 authored by Jonathan Yu's avatar Jonathan Yu

[svn-upgrade] Integrating new upstream version, libembperl-perl (2.3.0)

parent 92911f90
=pod
=head1 2.3.0 30. Sept. 2007
- Added support for Code ref in language message lookup hash.
That allows for internationalization to call a sub instead
of only looking up keys in a hash.
- Added UTF-8 messages to Embperl::Form::Validate.
- Include patch from Mark D. Anderson to make SSI syntax
behave more like mod_include.
- Make component -> curr_esc_mode available in Perl, requested
by Robert.
- Improve XHTML/XML support. Tags that are parsed by Embperl
like input, are now only have one slash at the end, if there
is already a slash in the source and output_mode is set to
xml. In addition checked attributes for input tags are now
added as checked="checked" to be valid xml.
Spotted by Villu Roogna.
- A lot of code was written for Embperl::Form a sophisticated
form creation/handling framework, which also contains some
nice AJAX and JS stuff like autocomplete input boxes,
grids and tabbed dialogs. Also the framework itself is ready
to use, there is not much documentation yet...
- Fixed wrong version numbers in make test files,
which caused make test to fail. Spotted by Matt Bockol.
- Use _stat() instead of stat() on Win32 to work around the problem
that Perl redefines stat() in an incompatibel way.
Spotted by Randy Korbes.
- Documented all options of embpexec.pl.
- Fixed default_language handling in Embperl::Form::Validate.
Patch from Kathryn Andersen.
- In Makefile.PL check for mod_perl2.pm instead of mod_perl
when mod_perl 2.x is used. Spotted by Dan Clawson.
- Included patch from Andrew O'Brian to correctly retrieve
Cookie header when running under Apache 2.
- Fixed timezone compiletime error on Mac OS-X. Patch from
Wolfgang Kinkeldei.
- Fixed segfault that might occur when an value of an input
attribute is removed. Spotted by Andrew Sitnikov.
- Fixed missing Perl Stack setup which causes memory errors on
BSD systems. Patch from Doug Rayner.
- Added internal check and error message when, due to a syntax
error in the source, a node is parsed as attribute.
Spotted by Kato M. Yoshiro.
- Fix segfault that occured during output of an error message
when not inside an Embperl request.
=head1 2.2.0 8. Apr. 2006
- Added new command [$ dump $] which can be used
......@@ -11,6 +56,7 @@
- Added Table of Content pod file, which lists
all available Embperl documentation, to get
a better overview. Thanks to Axel Beckert.
- Additional checked and notchecked Validationrules
- Fixed Cookie expire calculation, because
relative exipre times where only calculated
once at server startup. Spotted by Derrick Spell.
......@@ -23,7 +69,7 @@
string value is passed as string index, which
crashed if such a string index doesn't exists.
Spotted by Carl Eklof.
=head1 2.1.0 15. Nov 2005
- Added better UTF-8 support:
......
......@@ -219,7 +219,7 @@ F</tmp/embperl.log> on unix and F<\embperl.log> on windows.
Optional. Specifies the level of debugging (what is written to the
log file). The default is nothing. See L<"EMBPERL_DEBUG"> for exact values.
=item -o options
=item -t options
See L<"EMBPERL_OPTIONS"> for option values.
......@@ -227,6 +227,17 @@ See L<"EMBPERL_OPTIONS"> for option values.
Defines the syntax of the source. See See L<"EMBPERL_SYNTAX">
=item -p param
Gives a value which is passed in the @param array to the executed page.
Can be given multiple times.
=item -f fdat value
Gives a name/value pair which is passed in the %fdat hash to the executed page.
Can be given multiple times.
=back
......
......@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: DOM.xs 331953 2005-11-09 05:11:19Z richter $
# $Id: DOM.xs 580492 2007-09-28 21:44:19Z richter $
#
###################################################################################
......@@ -62,6 +62,8 @@ PREINIT:
char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
s = SV2String (sText, l) ;
......@@ -83,6 +85,8 @@ PREINIT:
char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
s = SV2String (sText, l) ;
......@@ -103,6 +107,8 @@ PREINIT:
char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
r -> Component.bSubNotEmpty = 1 ;
SvGETMAGIC_P4(sText) ;
......@@ -124,6 +130,8 @@ PREINIT:
const char * s ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
r -> Component.bSubNotEmpty = 1 ;
s = embperl_GetText (r, sId) ;
l = strlen (s) ;
......@@ -141,6 +149,8 @@ PREINIT:
SV * sRet ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
sRet = Node_replaceChildWithUrlDATA (r, pDomNode -> xDomTree, pDomNode -> xNode, r -> Component.nCurrRepeatLevel, sText) ;
......@@ -156,6 +166,8 @@ PREINIT:
SV * sRet ;
tReq * r = CurrReq ;
PPCODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
RETVAL = NULL ; /* avoid warning */
r -> Component.bSubNotEmpty = 1 ;
SvGETMAGIC_P4(sText) ;
......@@ -191,6 +203,8 @@ PREINIT:
tDomTree * pDomTree ;
tReq * r = CurrReq ;
CODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
sT = SV2String (sText, nText) ;
pDomTree = DomTree_self(pParentNode -> xDomTree) ;
Node_appendChild (r -> pApp, pDomTree, pParentNode -> xNode, r -> Component.nCurrRepeatLevel, (tNodeType)nType, 0, sT, nText, 0, 0, NULL) ;
......@@ -210,6 +224,8 @@ CODE:
int nEscMode = (SvUTF8(sText)?escHtmlUtf8:0) + ((r -> Component.nCurrEscMode & 11)== 3?1 + (r -> Component.nCurrEscMode & 4):r -> Component.nCurrEscMode) ;
char * sT = SV2String (sText, nText) ;
tDomTree * pDomTree = DomTree_self(xDomTree) ;
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
xNode = Node_appendChild (r -> pApp, pDomTree, xParent, r -> Component.nCurrRepeatLevel, (tNodeType)nType, 0, sT, nText, 0, 0, NULL) ;
pNode = Node_self(pDomTree,xNode) ;
pNode -> nType = (nEscMode & 8)?ntypText:((nEscMode & 3)?ntypTextHTML:ntypCDATA) ;
......@@ -226,6 +242,8 @@ PREINIT:
char * sText ;
tReq * r = CurrReq ;
CODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
sText = Node_childsText (r -> pApp, DomTree_self (xDomTree), xChild, r -> Component.nCurrRepeatLevel, 0, bDeep) ;
RETVAL = sText?sText:"" ;
OUTPUT:
......@@ -262,6 +280,8 @@ embperl_DomTree_iCheckpoint (nCheckpoint)
PREINIT:
tReq * r = CurrReq ;
CODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
r -> Component.nCurrEscMode = r -> Component.Config.nEscMode ;
r -> Component.bEscModeSet = -1 ;
DomTree_checkpoint (r, nCheckpoint) ;
......@@ -300,6 +320,8 @@ PREINIT:
tReq * r = CurrReq ;
SV * sEscapedText ;
CODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
sT = SV2String (sText, nText) ;
sA = SV2String (sAttr, nAttr) ;
......@@ -327,6 +349,8 @@ CODE:
STRLEN nText ;
char * sT = SV2String (sText, nText) ;
char * sA = SV2String (sAttr, nAttr) ;
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
sEscapedText = Escape (r, sT, nText, (SvUTF8(sText)?escHtmlUtf8:0) + r -> Component.nCurrEscMode, NULL, '\0') ;
sT = SV2String (sEscapedText, nText) ;
pDomTree = DomTree_self (xDomTree) ;
......@@ -347,6 +371,8 @@ PREINIT:
tDomTree * pDomTree ;
tReq * r = CurrReq ;
CODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
sA = SV2String (sAttr, nAttr) ;
pDomTree = DomTree_self (pDomNode -> xDomTree) ;
......@@ -364,6 +390,8 @@ CODE:
STRLEN nAttr ;
char * sA = SV2String (sAttr, nAttr) ;
tDomTree * pDomTree = DomTree_self (xDomTree) ;
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
Element_selfRemoveAttribut (r -> pApp, pDomTree, Node_self (pDomTree, xNode), r -> Component.nCurrRepeatLevel, sA, nAttr) ;
......@@ -382,6 +410,8 @@ PREINIT:
char * sAttrText = NULL ;
tReq * r = CurrReq ;
CODE:
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
pDomTree = DomTree_self (pAttr -> xDomTree) ;
Attr_selfValue (r -> pApp, pDomTree, Attr_self(pDomTree, pAttr -> xNode), r -> Component.nCurrRepeatLevel, &sAttrText) ;
......@@ -402,6 +432,8 @@ CODE:
char * sAttrText = NULL ;
tAttrData * pAttr ;
if (!r)
Perl_croak(aTHX_ "$Embperl::req undefined %s %d", __FILE__, __LINE__) ;
/* lprintf (CurrReq, "xDomTree=%d, xAttr=%d pDomTree=%x\n", xDomTree, xAttr, pDomTree) ;*/
pAttr = Attr_self(pDomTree, xAttr) ;
......
......@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: Embperl.pm 354348 2005-12-06 07:45:12Z richter $
# $Id: Embperl.pm 580573 2007-09-29 11:05:54Z richter $
#
###################################################################################
......@@ -49,7 +49,7 @@ use vars qw(
@ISA = qw(Exporter DynaLoader);
$VERSION = '2.2.0' ;
$VERSION = '2.3.0' ;
if ($modperl = $ENV{MOD_PERL})
......@@ -76,6 +76,7 @@ if ($modperl2)
require Apache2::RequestRec ;
require Apache2::RequestUtil ;
require Apache2::SubRequest ;
require APR::Table ;
$srv_rec = Apache2::ServerUtil -> server ;
}
else
......@@ -352,7 +353,7 @@ sub SetupSession
my $debug = $appparam?$appparam -> {debug} & Embperl::Constant::dbgSession:0 ;
if (!$uid)
{
my $cookie_val = $ENV{HTTP_COOKIE} || ($req_rec?$req_rec->header_in('Cookie'):undef) ;
my $cookie_val = $ENV{HTTP_COOKIE} || ($req_rec?$req_rec->headers_in -> {'Cookie'}:undef) ;
if ((defined ($cookie_val) && ($cookie_val =~ /$cookie_name=(.*?)(\;|\s|$)/)) || ($ENV{QUERY_STRING} =~ /$cookie_name=.*?:(.*?)(\;|\s|&|$)/) || $ENV{EMBPERL_UID} )
{
......
......@@ -252,7 +252,7 @@ first B<Arg> accordingly.
Example:
[- @arr = (1, 3, 5) -]
[$ foreach $v @arr $]
[$ foreach $v (@arr) $]
[+ $v +] <BR>
[$ endforeach $]
......@@ -1395,6 +1395,10 @@ ref on which you can push your message hashs. Embperl consults first the message
and if not found afterwards the default_message array for the correct message.
Because both are arrays you can push multiple message sets on it. This is handy when
your application object calls it's base class, which also may define some messages.
Starting with version 2.3.0 it is also possible, to add a code ref instead of a
hash ref to the arrays. The code is than called with the key as argument and
must return the translated text.
Here is an example:
......@@ -1426,6 +1430,20 @@ Here is an example:
push @{$r -> default_messages}, $messages{'en'} if ($lang ne 'en') ;
}
# Code ref works too...
@{$r -> messages} = (\&ecos::I18L::translate::gettext) ;
# and gettext is defined as
sub gettext
{
my ($key) = @_ ;
return "translated text" ;
}
1 ;
......@@ -1719,7 +1737,7 @@ archive at http://forum.swarthmore.edu/epigone/modperl
=head2 Commerical Support
You can get free support on the mod_perl mailing list (see above). If
You can get free support on the Embperl mailing list (see above). If
you need commercial support, ecos can provide it for you. We offer:
=over 4
......@@ -1752,6 +1770,10 @@ Send me patches for things you like to see in Embperl
=item 2
Donate money to Embperl. See http://perl.apache.org/donate.htm
=item 3
Buy commercial support (see above). Also you B<may> get the same answers
to your questions on the mailing list, by buying the commercial support
you not only buy support for yourself and can be sure you get an answer,
......
This diff is collapsed.
......@@ -31,17 +31,33 @@ sub new
{
my ($class, $args) = @_ ;
bless $args, $class ;
return $args ;
my $self = { %$args } ;
bless $self, $class ;
$self -> init ;
return $self ;
}
# ---------------------------------------------------------------------------
#
# noframe - do not draw frame border if this is the only control
# init - init the new control
#
sub init
{
my ($self) = @_ ;
return $self ;
}
# ---------------------------------------------------------------------------
#
# noframe - do not draw frame border if this is the only control
#
sub noframe
......@@ -54,12 +70,11 @@ sub noframe
# is_disabled - do not display this control at all
#
sub is_disabled
{
my ($self) = @_ ;
my ($self, $req) = @_ ;
return $self -> {disable} ;
}
......@@ -68,41 +83,38 @@ sub is_disabled
# is_readonly - could value of this control be changed ?
#
sub is_readonly
{
my ($self) = @_ ;
my ($self, $req) = @_ ;
return $self -> {readonly} ;
}
# ---------------------------------------------------------------------------
#
# show - output the control
# show - output the whole control including the label
#
sub show
{
my ($self, $data) = @_ ;
my ($self, $req) = @_ ;
$fdat{$self -> {name}} = $self -> {default} if ($fdat{$self -> {name}} eq '' && exists ($self -> {default})) ;
my $span = 0 ;
$span += $self -> show_label_cell ($span);
return $self -> show_control_cell ($span, $data) ;
$span += $self -> show_label_cell ($req, $span);
return $self -> show_control_cell ($req, $span) ;
}
# ---------------------------------------------------------------------------
#
# get_on_show_code
# get_on_show_code
#
# retuns js code that should be excuted when form becomes visible
#
sub get_on_show_code
sub get_on_show_code
{
return ;
}
......@@ -118,7 +130,6 @@ sub get_active_id
return ;
}
# ---------------------------------------------------------------------------
#
# form - return form object
......@@ -128,23 +139,22 @@ sub form
{
my ($self) = @_ ;
return $Embperl::Form::forms{$self -> {formid}} ;
return $Embperl::FormData::forms{$self -> {formptr}} ;
}
# ---------------------------------------------------------------------------
#
# get_validate_rules - get rules for validation
#
sub get_validate_rules
{
my ($self) = @_ ;
my ($self, $req) = @_ ;
my @local_rules ;
if ($self -> {validate})
{
@local_rules = ( -key => $self->{name} );
push @local_rules, -name => $self->{text} if ($self -> {text}) ;
push @local_rules, @{$self -> {validate}};
......@@ -160,43 +170,43 @@ sub get_validate_rules
__EMBPERL__
[$syntax EmbperlBlocks $]
[# ---------------------------------------------------------------------------
#
# show_sub_begin - output begin of sub form
#]
[$sub show_sub_begin ($self)
[$sub show_sub_begin ($self, $req)
my $span = $self->{width_percent} ;
$]
</tr><tr><td class="cBase cTabTD" colspan="[+ $span +]">
[$endsub$]
[# ---------------------------------------------------------------------------
#
# show_sub_end - output end of sub form
#]
[$sub show_sub_end ($self) $]
[$sub show_sub_end ($self, $req) $]
</td>
[$endsub$]
[# ---------------------------------------------------------------------------
#
# show - output the control
# show - output the label
#]
[$ sub show_label ($self) $][+ $self->{text} || $self->{name} +][$endsub$]
[$ sub show_label ($self, $req) $][+ $self->{text} || $self->{name} +][$endsub$]
[# ---------------------------------------------------------------------------
#
# show_label_icon - output the icon before the label
#]
[$sub show_label_icon ($self) $]
[$if $self -> {sublines} $]&nbsp;<img src="plus.png" style="vertical-align: middle;">[$endif$]
[$if $self -> {parentid} $]&nbsp;<img src="vline.png" style="vertical-align: middle;">[$endif$]
[$sub show_label_icon ($self, $req) $]
[$if $self -> {sublines} $]&nbsp;<img src="/images/plus.png" style="vertical-align: middle;">[$endif$]
[$if $self -> {parentid} $]&nbsp;<img src="/images/vline.png" style="vertical-align: middle;">[$endif$]
[$endsub$]
[# ---------------------------------------------------------------------------
......@@ -204,7 +214,7 @@ $]
# show - output the control
#]
[$ sub show_label_cell ($self)
[$ sub show_label_cell ($self, $req)
my $style = "";
$style = "white-space:nowrap;" if ($self->{labelnowrap}) ;
......@@ -213,8 +223,8 @@ $]
<td class="cLabelBox[$ if $self->{labelclass} $][+ " $self->{labelclass}" +][$ endif $]"
colspan="1" [$ if $style $]style="[+ $style +]"[$ endif $]>
[-
$self -> show_label ;
$self -> show_label_icon ;
$self -> show_label ($req);
$self -> show_label_icon ($req) ;
-]
</td>
[- return 1; -]
......@@ -222,17 +232,17 @@ $]
[# ---------------------------------------------------------------------------
#
# show_control - output the control
# show_control - output the control itself
#]
[$ sub show_control ($self) $][+ $self->{value} +][$endsub$]
[$ sub show_control ($self, $req) $][+ $self->{value} +][$endsub$]
[# ---------------------------------------------------------------------------
#
# show_control_readonly - output the control as readonly
#]
[$ sub show_control_readonly ($self) $][+ $self -> {value} || $fdat{$self -> {name}} +][$endsub$]
[$ sub show_control_readonly ($self, $req) $][+ $self -> {value} || $fdat{$self -> {name}} +][$endsub$]
[# ---------------------------------------------------------------------------
......@@ -240,12 +250,12 @@ $]
# show_controll_cell - output the table cell for the control
#]
[$ sub show_control_cell ($self, $x)
[$ sub show_control_cell ($self, $req, $x)
my $span = $self->{width_percent} - $x ;
$]
<td class="cControlBox" colspan="[+ $span +]">
[* my @ret = $self -> is_readonly?$self -> show_control_readonly:$self -> show_control ; *]
[* my @ret = $self -> is_readonly?$self -> show_control_readonly($req):$self -> show_control ($req); *]
</td>
[* return @ret ; *]
[$endsub$]
......@@ -275,6 +285,10 @@ that could be overwritten to customize the behaviour of your controls.
Create a new control
=head2 init
Init the new control
=head2 noframe
Do not draw frame border if this is the only control
......@@ -289,45 +303,49 @@ Could value of this control be changed ?
=head2 show
output the control
Output the control
=head2 get_on_show_code
Returns JavaScript code that should be executed when the form becomes visible
=head2 get_on_show_code
=head2 get_active_id
returns JavaScript code that should be executed when the form becomes visible
Get the id of the value which is currently active
=head2 form
return the form object of this control
Return the form object of this control
=head2 show_sub_begin
output begin of sub form
Output begin of sub form
=head2 show_sub_end
output end of sub form
Output end of sub form
=head2 show_label
output the label of the control
Output the label of the control
=head2 show_label_icon
output the icon after the label
Output the icon after the label
=head2 show_label_cell
output the table cell in which the label will be displayed
Output the table cell in which the label will be displayed
Must return the columns it spans (default: 1)
=head2 show_control
output the control itself
Output the control itself
=head2 show_control_cell
output the table cell in which the control will be displayed
Output the table cell in which the control will be displayed
Gets the x position as argument
......@@ -338,7 +356,7 @@ Gets the x position as argument
Specifies the name of the control
=head3 text
=head3 text
Will be used as label for the control, if not given
name is used as default
......@@ -353,7 +371,7 @@ If set, will be used as additional CSS classes for the label text cell.
=head2 readonly
If set, displays a readonly version of t control.
If set, displays a readonly version of the control.
=head2 disable
......@@ -377,6 +395,10 @@ With this parameter you can also specify the width of
the control in percent. This parameter take precendence over
C<width>
=head2 default
Default value of the control
=head1 AUTHOR
G. Richter (richter@dev.ecos.de)
......
......@@ -32,10 +32,10 @@ sub new
{
my ($class, $args) = @_ ;
my $self = Embperl::Form::Control -> new($args) ;
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})") ;
return $self ;
......@@ -46,27 +46,29 @@ sub new
1 ;
__EMBPERL__
[# ---------------------------------------------------------------------------
#
# show - output the control
#]
[$ sub show ($self)
[$ sub show ($self)
my $span = $self->{width_percent} ;
my $name = $self->{name} ;
$]
my $nsprefix = $self -> form -> {jsnamespace} ;
$]
<td class="cBase cControlBox" colspan="[+ $span +]">
<input type="hidden" id="[+ $name +]" name="[+ $name +]">
<img src="toleft.gif" title="Hinzufgen" onClick="addremoveAddOption (document.getElementById('[+ $self->{src} +]'), document.getElementById('[+ $self->{dest} +]'), document.getElementById('[+ $name +]'), [+ $self->{removesource} +])">
<img src="toleft.gif" title="Hinzufgen" onClick="[+ $nsprefix +]addremoveAddOption (document, document.getElementById('[+ $self->{src} +]'), document.getElementById('[+ $self->{dest} +]'), document.getElementById('[+ $name +]'), [+ $self->{removesource} +])">
<br>
<img src="toright.gif" title="Entfernen" onClick="addremoveRemoveOption (document.getElementById('[+ $self->{src} +]'), document.getElementById('[+ $self->{dest} +]'), document.getElementById('[+ $name +]'), [+ $self->{removesource} +])">
<img src="toright.gif" title="Entfernen" onClick="[+ $nsprefix +]addremoveRemoveOption (document, document.getElementById('[+ $self->{src} +]'), document.getElementById('[+ $self->{dest} +]'), document.getElementById('[+ $name +]'), [+ $self->{removesource} +])">
[#
print "<input class="cStandardButton" type=button value="Hinzufgen" onClick="addremoveAddOption (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="addremoveRemoveOption (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="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>
[$endsub$]
......@@ -82,12 +84,12 @@ Embperl::Form::Control::addremove - A control to add and remove items from two s
=head1 SYNOPSIS
{
{
type => 'addremove',
name => 'foo',
src => 'src_select_name',
dest => 'dest_select_name',