Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Embperl-cvs

svn commit: r355574 [1/2] - in /perl/embperl/trunk: ./ Embperl/Form/ Embperl/Form/Control/ Embperl/Syntax/ crypto/

 

 

ModPerl embperl-cvs RSS feed   Index | Next | Previous | View Threaded


richter at apache

Dec 9, 2005, 11:07 AM

Post #1 of 1 (1069 views)
Permalink
svn commit: r355574 [1/2] - in /perl/embperl/trunk: ./ Embperl/Form/ Embperl/Form/Control/ Embperl/Syntax/ crypto/

Author: richter
Date: Fri Dec 9 10:15:54 2005
New Revision: 355574

URL: http://svn.apache.org/viewcvs?rev=355574&view=rev
Log:
Doc updates

Added:
perl/embperl/trunk/TOC.pod
Modified:
perl/embperl/trunk/Embperl.pod
perl/embperl/trunk/Embperl/Form/Control.pm
perl/embperl/trunk/Embperl/Form/Control/addremove.pm
perl/embperl/trunk/Embperl/Form/Control/blank.pm
perl/embperl/trunk/Embperl/Form/Control/checkbox.pm
perl/embperl/trunk/Embperl/Form/Control/display.pm
perl/embperl/trunk/Embperl/Form/Control/file.pm
perl/embperl/trunk/Embperl/Form/Control/grid.pm
perl/embperl/trunk/Embperl/Form/Control/info.pm
perl/embperl/trunk/Embperl/Form/Control/input.pm
perl/embperl/trunk/Embperl/Form/Control/label.pm
perl/embperl/trunk/Embperl/Form/Control/number.pm
perl/embperl/trunk/Embperl/Form/Control/password.pm
perl/embperl/trunk/Embperl/Form/Control/radio.pm
perl/embperl/trunk/Embperl/Form/Control/select.pm
perl/embperl/trunk/Embperl/Form/Control/submit.pm
perl/embperl/trunk/Embperl/Form/Control/tabs.pm
perl/embperl/trunk/Embperl/Form/Control/textarea.pm
perl/embperl/trunk/Embperl/Form/Control/transparent.pm
perl/embperl/trunk/Embperl/Syntax/EmbperlBlocks.pm
perl/embperl/trunk/Embperl/Syntax/MsgIdExtract.pm
perl/embperl/trunk/Embperl/Syntax/POD.pm
perl/embperl/trunk/Embperl/Syntax/RTF.pm
perl/embperl/trunk/MANIFEST
perl/embperl/trunk/README
perl/embperl/trunk/crypto/README

Modified: perl/embperl/trunk/Embperl.pod
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl.pod?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl.pod (original)
+++ perl/embperl/trunk/Embperl.pod Fri Dec 9 10:15:54 2005
@@ -1,4 +1,3 @@
-
=head1 NAME

Embperl - Building dynamic Websites with Perl
@@ -6,6 +5,11 @@

=head1 SYNOPSIS

+For a list of available Embperl documentation please view
+L<Embperl::TOC> with perldoc(1) or man(1). If Embperl is not yet
+installed, have a look at perldoc TOC.pod in the distribution archive.
+
+

=head1 DESCRIPTION

@@ -1828,11 +1832,11 @@
be found at http://www.somewhere.com/software/


-=head1 Author
+=head1 AUTHOR

G. Richter (richter [at] dev)


-=head1 See Also
+=head1 SEE ALSO

perl(1), mod_perl, Apache httpd

Modified: perl/embperl/trunk/Embperl/Form/Control.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control.pm Fri Dec 9 10:15:54 2005
@@ -1,290 +1,308 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control ;
-
-use strict ;
-
-use Embperl::Inline ;
-
-# ---------------------------------------------------------------------------
-#
-# new - create a new control
-#
-
-
-sub new
-
- {
- my ($class, $args) = @_ ;
-
- bless $args, $class ;
-
- return $args ;
- }
-
-# ---------------------------------------------------------------------------
-#
-# noframe - do not draw frame border if this is the only control
-#
-
-
-sub noframe
-
- {
- return ;
- }
-
-
-# ---------------------------------------------------------------------------
-#
-# show - output the control
-#
-
-sub show
-
- {
- my ($self, $data) = @_ ;
-
- my $span = 0 ;
- $span += $self -> show_label_cell ($span);
- return $self -> show_control_cell ($span, $data) ;
- }
-
-# ---------------------------------------------------------------------------
-#
-# get_on_show_code
-#
-# retuns js code that should be excuted when form becomes visible
-#
-
-sub get_on_show_code
- {
- return ;
- }
-
-# ---------------------------------------------------------------------------
-#
-# get_active_id - get the id of the value which is currently active
-#
-
-sub get_active_id
-
- {
- return ;
- }
-
-
-# ---------------------------------------------------------------------------
-#
-# form - return form object
-#
-
-sub form
- {
- my ($self) = @_ ;
-
- return $Embperl::Form::forms{$self -> {formid}} ;
- }
-
-
-# ---------------------------------------------------------------------------
-#
-# get_validate_rules - get rules for validation
-#
-
-sub get_validate_rules
- {
- my ($self) = @_ ;
-
- 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}};
- }
- return \@local_rules ;
- }
-
-
-1 ;
-
-# ===========================================================================
-
-__EMBPERL__
-
-[$syntax EmbperlBlocks $]
-
-[.# ---------------------------------------------------------------------------
-#
-# show_sub_begin - output begin of sub form
-#]
-
-[$sub show_sub_begin ($self)
-
-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) $]
-</td>
-[$endsub$]
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[$ sub show_label ($self) $][+ $self->{text} +][$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$]
-[$endsub$]
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[$ sub show_label_cell ($self) $]
- <td class="cLabelBox" colspan="1">
- [.-
- $self -> show_label ;
- $self -> show_label_icon ;
- -]
- </td>
-[- return 1 -]
-[$endsub $]
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[$ sub show_control ($self) $][+ $self->{value} +][$endsub$]
-
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[.$ sub show_control_cell ($self, $x)
-
- my $span = $self->{width_percent} - $x ;
-$]
- <td class="cControlBox" colspan="[+ $span +]">
- [* my @ret = $self -> show_control ; *]
- </td>
-[* return @ret ; *]
-[$endsub$]
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control - Base class for controls inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
-Do not use directly, instead derive a class
-
-=head1 DESCRIPTION
-
-This class is not used directly, it is used as a base class for
-all controls inside a Embperl::Form. It provides a set of methods
-that could be overwritten to customize the behaviour of your controls.
-
-=head1 METHODS
-
-=head2 new
-
-Create a new control
-
-=head2 noframe
-
-Do not draw frame border if this is the only control
-
-=head2 show
-
-output the control
-
-=head2 get_on_show_code
-
-retuns js code that should be excuted when form becomes visible
-
-=head2 form
-
-return the form object of this control
-
-=head2 show_sub_begin
-
-output begin of sub form
-
-=head2 show_sub_end
-
-output end of sub form
-
-=head2 show_label
-
-output the label of the control
-
-=head2 show_label_icon
-
-output the icon after the label
-
-=head2 show_label_cell
-
-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
-
-=head2 show_control_cell
-
-output the table cell in which the control will be displayed
-
-Gets the x position as argument
-
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control ;
+
+use strict ;
+
+use Embperl::Inline ;
+
+# ---------------------------------------------------------------------------
+#
+# new - create a new control
+#
+
+
+sub new
+
+ {
+ my ($class, $args) = @_ ;
+
+ bless $args, $class ;
+
+ return $args ;
+ }
+
+# ---------------------------------------------------------------------------
+#
+# noframe - do not draw frame border if this is the only control
+#
+
+
+sub noframe
+
+ {
+ return ;
+ }
+
+
+# ---------------------------------------------------------------------------
+#
+# show - output the control
+#
+
+sub show
+
+ {
+ my ($self, $data) = @_ ;
+
+ my $span = 0 ;
+ $span += $self -> show_label_cell ($span);
+ return $self -> show_control_cell ($span, $data) ;
+ }
+
+# ---------------------------------------------------------------------------
+#
+# get_on_show_code
+#
+# retuns js code that should be excuted when form becomes visible
+#
+
+sub get_on_show_code
+ {
+ return ;
+ }
+
+# ---------------------------------------------------------------------------
+#
+# get_active_id - get the id of the value which is currently active
+#
+
+sub get_active_id
+
+ {
+ return ;
+ }
+
+
+# ---------------------------------------------------------------------------
+#
+# form - return form object
+#
+
+sub form
+ {
+ my ($self) = @_ ;
+
+ return $Embperl::Form::forms{$self -> {formid}} ;
+ }
+
+
+# ---------------------------------------------------------------------------
+#
+# get_validate_rules - get rules for validation
+#
+
+sub get_validate_rules
+ {
+ my ($self) = @_ ;
+
+ 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}};
+ }
+ return \@local_rules ;
+ }
+
+
+1 ;
+
+# ===========================================================================
+
+__EMBPERL__
+
+[$syntax EmbperlBlocks $]
+
+[.# ---------------------------------------------------------------------------
+#
+# show_sub_begin - output begin of sub form
+#]
+
+[$sub show_sub_begin ($self)
+
+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) $]
+</td>
+[$endsub$]
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[$ sub show_label ($self) $][+ $self->{text} +][$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$]
+[$endsub$]
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[.$ sub show_label_cell ($self)
+
+my $style = "";
+$style = "white-space:nowrap;" if ($self->{labelnowrap}) ;
+
+$]
+ <td class="cLabelBox[$ if $self->{labelclass} $][+ " $self->{labelclass}" +][$ endif $]"
+ colspan="1" [$ if $style $]style="[+ $style +]"[$ endif $]>
+ [.-
+ $self -> show_label ;
+ $self -> show_label_icon ;
+ -]
+ </td>
+ [- return 1; -]
+[$endsub$]
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[$ sub show_control ($self) $][+ $self->{value} +][$endsub$]
+
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[.$ sub show_control_cell ($self, $x)
+
+ my $span = $self->{width_percent} - $x ;
+$]
+ <td class="cControlBox" colspan="[+ $span +]">
+ [* my @ret = $self -> show_control ; *]
+ </td>
+[* return @ret ; *]
+[$endsub$]
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control - Base class for controls inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+Do not use directly, instead derive a class
+
+=head1 DESCRIPTION
+
+This class is not used directly, it is used as a base class for
+all controls inside an Embperl Form. It provides a set of methods
+that could be overwritten to customize the behaviour of your controls.
+
+=head1 METHODS
+
+=head2 new
+
+Create a new control
+
+=head2 noframe
+
+Do not draw frame border if this is the only control
+
+=head2 show
+
+output the control
+
+=head2 get_on_show_code
+
+returns JavaScript code that should be executed when the form becomes visible
+
+=head2 form
+
+return the form object of this control
+
+=head2 show_sub_begin
+
+output begin of sub form
+
+=head2 show_sub_end
+
+output end of sub form
+
+=head2 show_label
+
+output the label of the control
+
+=head2 show_label_icon
+
+output the icon after the label
+
+=head2 show_label_cell
+
+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
+
+=head2 show_control_cell
+
+output the table cell in which the control will be displayed
+
+Gets the x position as argument
+
+
+=head1 PARAMETERS
+
+=head2 labelnowrap
+
+If set, the text label will not be line wrapped.
+
+=head2 labelclass
+
+If set, will be used as additional CSS classes for the label text cell.
+
+
+
+=head1 AUTHOR
+
+G. Richter (richter [at] dev)
+
+=head1 SEE ALSO
+
+perl(1), Embperl, Embperl::Form
+

Modified: perl/embperl/trunk/Embperl/Form/Control/addremove.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/addremove.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/addremove.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/addremove.pm Fri Dec 9 10:15:54 2005
@@ -1,129 +1,129 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::addremove ;
-
-use strict ;
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-
-# ---------------------------------------------------------------------------
-#
-# new - create a new control
-#
-
-
-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 ;
- }
-
-
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[.$ sub show ($self)
-
- my $span = $self->{width_percent} ;
- my $name = $self->{name} ;
-$]
-
-<td class="cBase cControlBox" colspan="[+ $span +]">
-<input type="hidden" id="[+ $name +]" name="[+ $name +]">
-<img src="toleft.gif" title="Hinzufügen" onClick="addremoveAddOption (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} +])">
-
-[#
- print "<input class="cStandardButton" type=button value="Hinzufügen" 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" ;
-#]
-</td>
-[$endsub$]
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::addremove - A control to add and remove items from two select boxes inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'addremove',
- name => 'foo',
- src => 'src_select_name',
- dest => 'dest_select_name',
- removesource => 1,
- }
-
-=head1 DESCRIPTION
-
-A control to add and remove items from two select boxes
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'addremove'
-
-=head3 name
-
-Specifies the name of the addremove control
-
-=head3 src
-
-Gives the name of the select box which serves as source of the data items
-
-=head3 dest
-
-Gives the name of the select box which serves as destionations of the data items
-
-=head3 removesource
-
-If set to a true value the items will be removed from the source select box and
-move to the destionation box. If set to false, the items will be copied.
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::addremove ;
+
+use strict ;
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+
+# ---------------------------------------------------------------------------
+#
+# new - create a new control
+#
+
+
+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 ;
+ }
+
+
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[.$ sub show ($self)
+
+ my $span = $self->{width_percent} ;
+ my $name = $self->{name} ;
+$]
+
+<td class="cBase cControlBox" colspan="[+ $span +]">
+<input type="hidden" id="[+ $name +]" name="[+ $name +]">
+<img src="toleft.gif" title="Hinzufügen" onClick="addremoveAddOption (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} +])">
+
+[#
+ print "<input class="cStandardButton" type=button value="Hinzufügen" 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" ;
+#]
+</td>
+[$endsub$]
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::addremove - A control to add and remove items from two select boxes inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'addremove',
+ name => 'foo',
+ src => 'src_select_name',
+ dest => 'dest_select_name',
+ removesource => 1,
+ }
+
+=head1 DESCRIPTION
+
+A control to add and remove items from two select boxes
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'addremove'
+
+=head3 name
+
+Specifies the name of the addremove control
+
+=head3 src
+
+Gives the name of the select box which serves as source of the data items
+
+=head3 dest
+
+Gives the name of the select box which serves as destionations of the data items
+
+=head3 removesource
+
+If set to a true value the items will be removed from the source select box and
+move to the destionation box. If set to false, the items will be copied.
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/blank.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/blank.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/blank.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/blank.pm Fri Dec 9 10:15:54 2005
@@ -1,81 +1,81 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::blank ;
-
-use strict ;
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[.$ sub show ($self, $data)
-
-my $span = ($self->{width_percent}) ;
-$]
-<td class="cBase cControlBox" colspan="[+ $span +]">[+ $self->{text} +]</td>
-[$endsub$]
-
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::blank - A blank area inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'blank',
- text => 'blabla'
- }
-
-=head1 DESCRIPTION
-
-Used to create a blank area with optional text inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'blank'
-
-=head3 text (optional)
-
-Could be used to give a text that should be displayed inside the blank area
-
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::blank ;
+
+use strict ;
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[.$ sub show ($self, $data)
+
+my $span = ($self->{width_percent}) ;
+$]
+<td class="cBase cControlBox" colspan="[+ $span +]">[+ $self->{text} +]</td>
+[$endsub$]
+
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::blank - A blank area inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'blank',
+ text => 'blabla'
+ }
+
+=head1 DESCRIPTION
+
+Used to create a blank area with optional text inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'blank'
+
+=head3 text (optional)
+
+Could be used to give a text that should be displayed inside the blank area
+
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/checkbox.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/checkbox.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/checkbox.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/checkbox.pm Fri Dec 9 10:15:54 2005
@@ -1,112 +1,112 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::checkbox ;
-
-use strict ;
-use vars qw{%fdat} ;
-
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-
-# ---------------------------------------------------------------------------
-#
-# get_active_id - get the id of the value which is currently active
-#
-
-sub get_active_id
-
- {
- my ($self) = @_ ;
-
- my $name = $self -> {name} ;
- my $val = $self -> {value} || 1 ;
-
- return $val eq $fdat{$name}?"$name-0":"$name-1" ;
- }
-
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show_control - output the control
-#]
-
-[.$ sub show_control ($self)
-
- my $name = $self -> {name} ;
- my $val = $self -> {value} || 1 ;
-$]
-<input type="checkbox" class="cBase cControlCheckbox" name="[+ $name +]" value="[+ $val +]"
-[$if ($self -> {sublines} || $self -> {subobjects}) $] OnClick="show_checked(this)" [$endif$]
->
-[$endsub$]
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::checkbox - A checkbox control inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'checkbox',
- text => 'blabla',
- name => 'foo',
- value => 'bar'
- }
-
-=head1 DESCRIPTION
-
-Used to create an checkbox control inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'checkbox'
-
-=head3 name
-
-Specifies the name of the checkbox control
-
-=head3 text
-
-Will be used as label for the checkbox control
-
-=head3 value
-
-Gives the value of the checkbox
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::checkbox ;
+
+use strict ;
+use vars qw{%fdat} ;
+
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+
+# ---------------------------------------------------------------------------
+#
+# get_active_id - get the id of the value which is currently active
+#
+
+sub get_active_id
+
+ {
+ my ($self) = @_ ;
+
+ my $name = $self -> {name} ;
+ my $val = $self -> {value} || 1 ;
+
+ return $val eq $fdat{$name}?"$name-0":"$name-1" ;
+ }
+
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show_control - output the control
+#]
+
+[.$ sub show_control ($self)
+
+ my $name = $self -> {name} ;
+ my $val = $self -> {value} || 1 ;
+$]
+<input type="checkbox" class="cBase cControlCheckbox" name="[+ $name +]" value="[+ $val +]"
+[$if ($self -> {sublines} || $self -> {subobjects}) $] OnClick="show_checked(this)" [$endif$]
+>
+[$endsub$]
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::checkbox - A checkbox control inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'checkbox',
+ text => 'blabla',
+ name => 'foo',
+ value => 'bar'
+ }
+
+=head1 DESCRIPTION
+
+Used to create an checkbox control inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'checkbox'
+
+=head3 name
+
+Specifies the name of the checkbox control
+
+=head3 text
+
+Will be used as label for the checkbox control
+
+=head3 value
+
+Gives the value of the checkbox
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/display.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/display.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/display.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/display.pm Fri Dec 9 10:15:54 2005
@@ -1,75 +1,94 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::display ;
-
-use strict ;
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show_control - output the control
-#]
-
-[$ sub show_control ($self) $][+ exists $self -> {value}?$self -> {value}:$fdat{$self -> {name}} +][$endsub$]
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::display - A text display control inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'input',
- text => 'blabla',
- name => 'foo',
- }
-
-=head1 DESCRIPTION
-
-Used to create a display only control inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'display'
-
-=head3 text
-
-Will be used as label for the text display control
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::display ;
+
+use strict ;
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show_control - output the control
+#]
+
+[.$ sub show_control ($self)
+
+my $name = $self->{name};
+my $value = exists $self->{value} ? $self->{value} : $fdat{$name};
+
+$][+ $value +]
+[$ if $self->{hidden} $]
+<input type="hidden" name="[+ $name +]" value="[+ $value +]">
+[$endif$]
+[$endsub$]
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::display - A text display control inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'display',
+ text => 'blabla',
+ hidden => 1,
+ name => 'foo',
+ }
+
+=head1 DESCRIPTION
+
+Used to create a display only control inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be set to 'display'.
+
+=head3 text
+
+Will be used as label for the text display control.
+
+=head3 hidden
+
+If set, an appropriate hidden input field will be created
+automatically.
+
+=head3 name
+
+Will be used as name for the hidden input field.
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/file.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/file.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/file.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/file.pm Fri Dec 9 10:15:54 2005
@@ -1,94 +1,94 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::file ;
-
-use strict ;
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show_control - output the control
-#]
-
-[$ sub show_control ($self) $]
-
-<input type="file" class="cBase cControl" name="[+ $self->{name} +]"
-[$if $self -> {size} $]size="[+ $self->{size} +]"[$endif$]
-[$if $self -> {maxlength} $]size="[+ $self->{maxlength} +]"[$endif$]
->
-[$endsub$]
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::file - A file upload input control inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'file',
- text => 'blabla',
- name => 'foo',
- size => 10,
- }
-
-=head1 DESCRIPTION
-
-Used to create a file upload control inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'file'
-
-=head3 name
-
-Specifies the name of the upload control
-
-=head3 text
-
-Will be used as label for the file upload input control
-
-=head3 size
-
-Gives the size in characters
-
-=head3 maxlength
-
-Gives the maximun length in characters
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::file ;
+
+use strict ;
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show_control - output the control
+#]
+
+[$ sub show_control ($self) $]
+
+<input type="file" class="cBase cControl" name="[+ $self->{name} +]"
+[$if $self -> {size} $]size="[+ $self->{size} +]"[$endif$]
+[$if $self -> {maxlength} $]size="[+ $self->{maxlength} +]"[$endif$]
+>
+[$endsub$]
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::file - A file upload input control inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'file',
+ text => 'blabla',
+ name => 'foo',
+ size => 10,
+ }
+
+=head1 DESCRIPTION
+
+Used to create a file upload control inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'file'
+
+=head3 name
+
+Specifies the name of the upload control
+
+=head3 text
+
+Will be used as label for the file upload input control
+
+=head3 size
+
+Gives the size in characters
+
+=head3 maxlength
+
+Gives the maximun length in characters
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/grid.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/grid.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/grid.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/grid.pm Fri Dec 9 10:15:54 2005
@@ -1,470 +1,470 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::grid ;
-
-use strict ;
-use base 'Embperl::Form::ControlMultValue' ;
-
-use vars qw{%fdat $epreq} ;
-
-use Embperl::Inline ;
-
-# ---------------------------------------------------------------------------
-#
-# new - create a new control
-#
-
-
-sub new
-
- {
- my ($class, $args) = @_ ;
-
- my $self = Embperl::Form::ControlMultValue -> new($args) ;
- bless $self, $class ;
-
- $self -> {width} = 1 ;
- return $self ;
- }
-
-
-# ---------------------------------------------------------------------------
-#
-# get_on_show_code
-#
-# retuns js code that should be excuted when form becomes visible
-#
-
-sub get_on_show_code
- {
- my ($self) = @_ ;
- return "switch_grid('$self->{id}')";
- }
-
-# ---------------------------------------------------------------------------
-
-sub get_object
- {
- my $self = shift;
- return 'grid-entry';
- }
-
-# -------------------------------------------------------------------------------------- ----
-
-sub gridname
- {
- return 'cGridSimple';
- }
-
-# ------------------------------------------------------------------------------------------
-
-sub prepare_fdat
- {
- my $self = shift;
-
- my %list;
- my $gridname = $self->gridname;
- my $ldap = $epreq->{ldap};
-
-
- foreach my $entry (keys %fdat)
- {
-
- next if ($entry !~ /_($gridname)_/);
-
- if( $entry =~ /^_grid_[^_]+_([^_]+)_(\d+)/ )
- {
-
- my $name = $1;
- my $index = $2;
- my $value = $fdat{$entry};
- $list{$index}->{$name} = $value;
- delete $fdat{$entry};
- }
- }
-
- my @entries;
-
- foreach my $index (keys %list)
- {
- my $entry = $list{$index};
- $entry->{address} =~ s/^--(.*)--$//;
- $entry->{param} =~ s/^--(.*)--$//;
- my $attr = $ldap->joinAttrValue([$index,$entry->{active},$entry->{param}]);
- push @entries,$attr;
- }
-
- $fdat{$self->get_object} = join ("\t",@entries);
- }
-
-
-
-# ------------------------------------------------------------------------------------------
-
-sub get_data
- {
- my $self = shift;
- my $ldap = $epreq->{ldap};
- my @data;
- my @create =
- (
- {
- param => '-- Bitte Daten eintragen --',
- active => 0,
- }
- ) ;
-
- my @entries = split("\t",$fdat{$self->get_object});
-
- foreach my $entry (@entries)
- {
- my ($index,$active,$param) = $ldap->splitAttrValue($entry);
- my $field = {};
- $param ||= $self->empty_line;
- $field->{active} = $active;
- $field->{param} = $param;
-
- push @data,$field;
- }
-
- @data = @create if (! @data);
-
- return (\@data, \@create) ;
- }
-
-sub init
- {
- my ($self) = @_;
- $self -> {gridname} = $self -> gridname ;
- ($self -> {data}, $self -> {create}) = $self -> get_data ;
- }
-
-sub trclass { 'cGridData' }
-sub hiddentrclass { '' }
-sub gridname { 'default' }
-sub onSubmit {'post_grid_data();return 1;'};
-sub prepare_fdat {}
-#sub empty_line {'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'}
-sub empty_line {' '}
-sub passmask {'****'}
-sub passmask {'****'}
-sub compare_pw_list
- {
- my ($self,$dn,$attrname,$attr2write,$attrindex,$savedindex) = @_;
- my $ldap = $epreq->{ldap};
- my $attrs = [$attrname];
- my $ldap_obj = $ldap->search($dn,'objectclass=*','base',$attrs);
- my $attrsaved = $ldap_obj->{$dn}->{$attrname};
- my %attrsaved;
- my %attr2write;
- my $passmask = $self->passmask;
-
-#print STDERR 'START';
-#print STDERR Data::Dumper::Dumper($attr2write);
-#print STDERR Data::Dumper::Dumper($attrsaved);
-
- foreach my $entry (@$attrsaved)
- {
- my @entry = $ldap->splitAttrValue($entry);
- my $index = $entry[$savedindex];
- my $pass = $entry[$attrindex];
- $attrsaved{$index} = $pass;
- }
-
-#print STDERR Data::Dumper::Dumper(\%attrsaved);
-
- my $i = 0;
- foreach my $entry (@$attr2write)
- {
- my @entry = $ldap->splitAttrValue($entry);
- my $index = $entry[$savedindex];
- my $pass = $entry[$attrindex];
- if ($pass eq $passmask)
- {
- $pass = $attrsaved{$index};
- $entry[$attrindex] = $pass;
- }
- my $entry2write = $ldap->joinAttrValue(\@entry);
- $attr2write->[$i] = $entry2write;
- $i++;
- }
-#print STDERR Data::Dumper::Dumper($attr2write);
- return $attr2write;
- }
-
-
-
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[.$ sub show ($self)
-
-my $span = ($self->{width_percent}) ;
-$]
- <td class="cBase cLabelBox" colspan="[+ $span +]">
- [- shift -> showgrid (@_) -]
- </td>
-[$endsub$]
-
-
-
-[# ################################################################################################
- draw_additional_div
- ################################################################################################ #]
-[$ sub draw_additional_div $]
-<div id="additional[- $self->draw_table_id; -]" class="cGridHidden">
-</div>
-[$ endsub $]
-[# #--- draw_additional_div ----# #]
-
-[# ################################################################################################
- draw_auto_table
- ################################################################################################ #]
-[$ sub draw_auto_table $]
-<table id="auto_table" class="cGridHidden"></table>
-[$ endsub $]
-[# #--- draw_auto_table ----# #]
-
-[.# ################################################################################################
- draw_grid_table Erzeugt eine Grid-Tabelle
- in hidden wenn gestetzt wird eine dynamische Tabelle erzeugt
- ################################################################################################ #]
-[$ sub draw_grid_table $]
- [.-
- my ($self,$hidden) = @_;
-
- if($hidden)
- {
- $grid_data = $self -> {create};
- $trclass = $self -> hiddentrclass ;
- }
- else
- {
- $grid_data = $self -> {data};
- $trclass = $self -> trclass ;
- }
- $fields = $self -> {fields} ;
- $id = $self->{currentid};
- $id ||= 1 ;
- -]
- [$foreach $entry (@$grid_data)$]
-
- <TR [$if( $trclass )$]class="[+ $trclass +]"[$endif$]>
-
- [$foreach $field (@$fields)$]
- [.-
- $val = $entry->{$field->{'name'}};
- $domid = '_grid_'.$self->{gridname}.'_'.$field->{name}."_$id" ;
- if($field->{type} && $epreq -> can ($field->{type}))
- {
- my $method = $field -> {type} ;
- $epreq -> $method ($field);
- }
-
- -]
-
- [$if($field->{'type'} eq 'checkbox')$]
- <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]"><input name="[+$domid+]" type="checkbox" value="1" [$if($val)$]checked[$endif$]></TD>
- [$elsif($field->{'type'} eq 'select')$]
-[-
-#use Data::Dumper;
-#print STDERR Dumper($field);
--]
- <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]">
- <select name="[+$domid+]" size="[+ $field->{size} | 1 +]">
- [-$i=0-]
- [$foreach my $option (@{$field->{options}}) $][-$value = $field->{values}->[$i] -]
- <option value="[+$value+]" [$ if( $val eq $value)$]selected[$endif$]>[+$option+]</option>
- [-$i++-]
- [$endforeach$]
- </select></TD>
- [$elsif($field->{'type'} eq 'blank')$]
- <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]" width="[+$field->{'width'}+]"></TD>
- [$elsif($field->{'type'} eq 'hidden')$]
- <TD style="display:none;"> <input type="hidden" name="[+$domid+]" value="[+$val+]"></TD>
- [$else$]
- <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]" width="[+$field->{'width'}+]">[+$val+]</TD>
- [$endif$]
- [$endforeach$]
-
- </TR>
- [- $id++;-]
- [$endforeach$]
- [-$self->{currentid} = $id;-]
-[$ endsub $]
-[# #--- draw_grid_table ----# #]
-
-[.# ################################################################################################
- draw_grid_control Erzeugt die Buttons zur Grid Steuerung
- ################################################################################################ #]
-[$ sub draw_grid_control $]
- [-
- ($self) = @_;
- -]
- <table class="control" align="center" cellpadding=0 cellspacing=0 border=0 rules="none" >
- <TR class="control">
- <TD colspan="[+self->{'control_colspan'}+]" align="center">
- <input class="cStandardButton" type="button" id="cmdAdd" name="-add" value="Hinzuf&uuml;gen" onclick="appendRow('[+$self->{'appendline_for_js'}+]')" title="Hinzuf&uuml;gen">
- <input class="cStandardButton" type="button" id="cmdDelete" name="-delete" value="L&ouml;schen" onclick="delete_from_form('[+$self->{'appendline_for_js'}+]')" title="L&ouml;schen">
- </TD>
- </TR>
- </table>
-[$ endsub $]
-[# #--- draw_grid_control ----# #]
-
-[# ################################################################################################
- draw_grid_header Erzeugt den Tabellenkopf
- ################################################################################################ #]
-[$ sub draw_grid_header $]
- [.-
- ($self) = @_;
- $gridfields = $self->{'fields'};
- -]
- <TR class="cGridHeader">[-$i=0-]
- [.* for (my $i = 0; $i < @$gridfields ; $i++) { *]
- [$if ($gridfields->[$i]->{text} )$]<TD class="cGridHeader" [$ if ($gridfields->[$i]->{sorted})$]axis="sorted"[$endif$] [$if($width = $gridfields->[$i]->{width})$]width="[+$width+]"[$endif$]>[+$gridfields->[$i]->{text}+]</TD>[$endif$]
- [* } *]
- </TR>
-[$ endsub $]
-[# #--- draw_grid_header ----# #]
-
-[.# -----------------------------------------------------------------------------
-#
-# show_grid_title - Zeigt den Titel der Tabelle an
-#]
-
-[$ sub show_grid_title $]
-[-
-($self) = @_;
--]
-<table class="cBase cGridTitle">
- <tr class="cTableRow">
- <td class="cBase cGridLabelBox">[+ $self->{text} +]</td>
- <td class="cBase cGridControlBox">
- <img src="button_neu.gif" id="cmdAdd" name="-add" title="Zeile Hinzuf&uuml;gen" onclick="appendRow('[+$self->{'appendline_for_js'}+]')">
- <img src="button_loeschen.gif" id="cmdDelete" name="-delete" title="Markierte Zeile L&ouml;schen" onclick="delete_from_form('[+$self->{'appendline_for_js'}+]')">
- </td>
- </tr>
-</table>
-[$ endsub $]
-
-[.# ################################################################################################
- draw_table_id Zeigt die DOM Id der Tabelle an
- ################################################################################################ #]
-
-[$ sub draw_table_id $][- ($self) = @_;-][+$self -> {id} +][$ endsub $]
-[# #--- draw_title ----# #]
-
-
-
-[.# ################################################################################################
- show Erzeugt eine dynamische Tabelle
-
- in objektspezifische Grid-Daten Struktur :
-
- gridfields = Felder der Grid-Tabelle (angelehnt an das fields Format)
- griddata = Datensatz mit den Werten der Tabelle
- initdata = Datensatz mit den initialen Werten der Tabelle
- names2display = (optional) Arrayref mit den Titeln des Tabellenkopfes
- title = Titel der Grid-Tabelle
- trclass = css Klasse der Tabellenzeilen
- hiddentrclass = (optional) css Klasse für versteckte Tabellenfelder
- ################################################################################################ #]
-
-[$ sub showgrid $]
-[.-
-($self) = @_;
-
-$self -> init() ;
-$epreq -> {'onSubmitLdapData'} = $self -> onSubmit ;
-
--]
-
-[.#
-<link rel="stylesheet" type="text/css" href="/grid.css">
-<link rel="stylesheet" type="text/css" href="/base.css">
-<SCRIPT src="/js/TableCtrl.js"></SCRIPT>
-#]
-
-[- $self->show_grid_title; -]
-<table class="cBase cGridTable" id="[- $self->draw_table_id; -]" name="[- $self->draw_table_id; -]">
-[- $self->draw_grid_header; -]
-[- $self-> draw_grid_table; -]
-</table>
-
-[- $self->draw_auto_table;-]
-[- $self->draw_additional_div; -]
-
-<div id="hidden_table_container[- $self->draw_table_id; -]" class="cGridHidden">
-
-<table id="hidden[- $self->draw_table_id; -]" class="cGridHidden">
-[- $self-> draw_grid_table(1); -]
-</table>
-</div>
-
-<div id="temp[- $self->draw_table_id; -]">
-</div>
-
-<SCRIPT language="javascript">
-init('[- $self->draw_table_id; -]');
-</SCRIPT>
-
-[$endsub$]
-[# #--- show ----# #]
-
-
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::grid - A grid control inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
-
-=head1 DESCRIPTION
-
-Used to create a grid control inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'grid'
-
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::grid ;
+
+use strict ;
+use base 'Embperl::Form::ControlMultValue' ;
+
+use vars qw{%fdat $epreq} ;
+
+use Embperl::Inline ;
+
+# ---------------------------------------------------------------------------
+#
+# new - create a new control
+#
+
+
+sub new
+
+ {
+ my ($class, $args) = @_ ;
+
+ my $self = Embperl::Form::ControlMultValue -> new($args) ;
+ bless $self, $class ;
+
+ $self -> {width} = 1 ;
+ return $self ;
+ }
+
+
+# ---------------------------------------------------------------------------
+#
+# get_on_show_code
+#
+# retuns js code that should be excuted when form becomes visible
+#
+
+sub get_on_show_code
+ {
+ my ($self) = @_ ;
+ return "switch_grid('$self->{id}')";
+ }
+
+# ---------------------------------------------------------------------------
+
+sub get_object
+ {
+ my $self = shift;
+ return 'grid-entry';
+ }
+
+# -------------------------------------------------------------------------------------- ----
+
+sub gridname
+ {
+ return 'cGridSimple';
+ }
+
+# ------------------------------------------------------------------------------------------
+
+sub prepare_fdat
+ {
+ my $self = shift;
+
+ my %list;
+ my $gridname = $self->gridname;
+ my $ldap = $epreq->{ldap};
+
+
+ foreach my $entry (keys %fdat)
+ {
+
+ next if ($entry !~ /_($gridname)_/);
+
+ if( $entry =~ /^_grid_[^_]+_([^_]+)_(\d+)/ )
+ {
+
+ my $name = $1;
+ my $index = $2;
+ my $value = $fdat{$entry};
+ $list{$index}->{$name} = $value;
+ delete $fdat{$entry};
+ }
+ }
+
+ my @entries;
+
+ foreach my $index (keys %list)
+ {
+ my $entry = $list{$index};
+ $entry->{address} =~ s/^--(.*)--$//;
+ $entry->{param} =~ s/^--(.*)--$//;
+ my $attr = $ldap->joinAttrValue([$index,$entry->{active},$entry->{param}]);
+ push @entries,$attr;
+ }
+
+ $fdat{$self->get_object} = join ("\t",@entries);
+ }
+
+
+
+# ------------------------------------------------------------------------------------------
+
+sub get_data
+ {
+ my $self = shift;
+ my $ldap = $epreq->{ldap};
+ my @data;
+ my @create =
+ (
+ {
+ param => '-- Bitte Daten eintragen --',
+ active => 0,
+ }
+ ) ;
+
+ my @entries = split("\t",$fdat{$self->get_object});
+
+ foreach my $entry (@entries)
+ {
+ my ($index,$active,$param) = $ldap->splitAttrValue($entry);
+ my $field = {};
+ $param ||= $self->empty_line;
+ $field->{active} = $active;
+ $field->{param} = $param;
+
+ push @data,$field;
+ }
+
+ @data = @create if (! @data);
+
+ return (\@data, \@create) ;
+ }
+
+sub init
+ {
+ my ($self) = @_;
+ $self -> {gridname} = $self -> gridname ;
+ ($self -> {data}, $self -> {create}) = $self -> get_data ;
+ }
+
+sub trclass { 'cGridData' }
+sub hiddentrclass { '' }
+sub gridname { 'default' }
+sub onSubmit {'post_grid_data();return 1;'};
+sub prepare_fdat {}
+#sub empty_line {'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'}
+sub empty_line {' '}
+sub passmask {'****'}
+sub passmask {'****'}
+sub compare_pw_list
+ {
+ my ($self,$dn,$attrname,$attr2write,$attrindex,$savedindex) = @_;
+ my $ldap = $epreq->{ldap};
+ my $attrs = [$attrname];
+ my $ldap_obj = $ldap->search($dn,'objectclass=*','base',$attrs);
+ my $attrsaved = $ldap_obj->{$dn}->{$attrname};
+ my %attrsaved;
+ my %attr2write;
+ my $passmask = $self->passmask;
+
+#print STDERR 'START';
+#print STDERR Data::Dumper::Dumper($attr2write);
+#print STDERR Data::Dumper::Dumper($attrsaved);
+
+ foreach my $entry (@$attrsaved)
+ {
+ my @entry = $ldap->splitAttrValue($entry);
+ my $index = $entry[$savedindex];
+ my $pass = $entry[$attrindex];
+ $attrsaved{$index} = $pass;
+ }
+
+#print STDERR Data::Dumper::Dumper(\%attrsaved);
+
+ my $i = 0;
+ foreach my $entry (@$attr2write)
+ {
+ my @entry = $ldap->splitAttrValue($entry);
+ my $index = $entry[$savedindex];
+ my $pass = $entry[$attrindex];
+ if ($pass eq $passmask)
+ {
+ $pass = $attrsaved{$index};
+ $entry[$attrindex] = $pass;
+ }
+ my $entry2write = $ldap->joinAttrValue(\@entry);
+ $attr2write->[$i] = $entry2write;
+ $i++;
+ }
+#print STDERR Data::Dumper::Dumper($attr2write);
+ return $attr2write;
+ }
+
+
+
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[.$ sub show ($self)
+
+my $span = ($self->{width_percent}) ;
+$]
+ <td class="cBase cLabelBox" colspan="[+ $span +]">
+ [- shift -> showgrid (@_) -]
+ </td>
+[$endsub$]
+
+
+
+[# ################################################################################################
+ draw_additional_div
+ ################################################################################################ #]
+[$ sub draw_additional_div $]
+<div id="additional[- $self->draw_table_id; -]" class="cGridHidden">
+</div>
+[$ endsub $]
+[# #--- draw_additional_div ----# #]
+
+[# ################################################################################################
+ draw_auto_table
+ ################################################################################################ #]
+[$ sub draw_auto_table $]
+<table id="auto_table" class="cGridHidden"></table>
+[$ endsub $]
+[# #--- draw_auto_table ----# #]
+
+[.# ################################################################################################
+ draw_grid_table Erzeugt eine Grid-Tabelle
+ in hidden wenn gestetzt wird eine dynamische Tabelle erzeugt
+ ################################################################################################ #]
+[$ sub draw_grid_table $]
+ [.-
+ my ($self,$hidden) = @_;
+
+ if($hidden)
+ {
+ $grid_data = $self -> {create};
+ $trclass = $self -> hiddentrclass ;
+ }
+ else
+ {
+ $grid_data = $self -> {data};
+ $trclass = $self -> trclass ;
+ }
+ $fields = $self -> {fields} ;
+ $id = $self->{currentid};
+ $id ||= 1 ;
+ -]
+ [$foreach $entry (@$grid_data)$]
+
+ <TR [$if( $trclass )$]class="[+ $trclass +]"[$endif$]>
+
+ [$foreach $field (@$fields)$]
+ [.-
+ $val = $entry->{$field->{'name'}};
+ $domid = '_grid_'.$self->{gridname}.'_'.$field->{name}."_$id" ;
+ if($field->{type} && $epreq -> can ($field->{type}))
+ {
+ my $method = $field -> {type} ;
+ $epreq -> $method ($field);
+ }
+
+ -]
+
+ [$if($field->{'type'} eq 'checkbox')$]
+ <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]"><input name="[+$domid+]" type="checkbox" value="1" [$if($val)$]checked[$endif$]></TD>
+ [$elsif($field->{'type'} eq 'select')$]
+[-
+#use Data::Dumper;
+#print STDERR Dumper($field);
+-]
+ <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]">
+ <select name="[+$domid+]" size="[+ $field->{size} | 1 +]">
+ [-$i=0-]
+ [$foreach my $option (@{$field->{options}}) $][-$value = $field->{values}->[$i] -]
+ <option value="[+$value+]" [$ if( $val eq $value)$]selected[$endif$]>[+$option+]</option>
+ [-$i++-]
+ [$endforeach$]
+ </select></TD>
+ [$elsif($field->{'type'} eq 'blank')$]
+ <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]" width="[+$field->{'width'}+]"></TD>
+ [$elsif($field->{'type'} eq 'hidden')$]
+ <TD style="display:none;"> <input type="hidden" name="[+$domid+]" value="[+$val+]"></TD>
+ [$else$]
+ <TD id="[+$domid+]" class="cGrid[+ ucfirst(lc($field->{'type'}))+]" width="[+$field->{'width'}+]">[+$val+]</TD>
+ [$endif$]
+ [$endforeach$]
+
+ </TR>
+ [- $id++;-]
+ [$endforeach$]
+ [-$self->{currentid} = $id;-]
+[$ endsub $]
+[# #--- draw_grid_table ----# #]
+
+[.# ################################################################################################
+ draw_grid_control Erzeugt die Buttons zur Grid Steuerung
+ ################################################################################################ #]
+[$ sub draw_grid_control $]
+ [-
+ ($self) = @_;
+ -]
+ <table class="control" align="center" cellpadding=0 cellspacing=0 border=0 rules="none" >
+ <TR class="control">
+ <TD colspan="[+self->{'control_colspan'}+]" align="center">
+ <input class="cStandardButton" type="button" id="cmdAdd" name="-add" value="Hinzuf&uuml;gen" onclick="appendRow('[+$self->{'appendline_for_js'}+]')" title="Hinzuf&uuml;gen">
+ <input class="cStandardButton" type="button" id="cmdDelete" name="-delete" value="L&ouml;schen" onclick="delete_from_form('[+$self->{'appendline_for_js'}+]')" title="L&ouml;schen">
+ </TD>
+ </TR>
+ </table>
+[$ endsub $]
+[# #--- draw_grid_control ----# #]
+
+[# ################################################################################################
+ draw_grid_header Erzeugt den Tabellenkopf
+ ################################################################################################ #]
+[$ sub draw_grid_header $]
+ [.-
+ ($self) = @_;
+ $gridfields = $self->{'fields'};
+ -]
+ <TR class="cGridHeader">[-$i=0-]
+ [.* for (my $i = 0; $i < @$gridfields ; $i++) { *]
+ [$if ($gridfields->[$i]->{text} )$]<TD class="cGridHeader" [$ if ($gridfields->[$i]->{sorted})$]axis="sorted"[$endif$] [$if($width = $gridfields->[$i]->{width})$]width="[+$width+]"[$endif$]>[+$gridfields->[$i]->{text}+]</TD>[$endif$]
+ [* } *]
+ </TR>
+[$ endsub $]
+[# #--- draw_grid_header ----# #]
+
+[.# -----------------------------------------------------------------------------
+#
+# show_grid_title - Zeigt den Titel der Tabelle an
+#]
+
+[$ sub show_grid_title $]
+[-
+($self) = @_;
+-]
+<table class="cBase cGridTitle">
+ <tr class="cTableRow">
+ <td class="cBase cGridLabelBox">[+ $self->{text} +]</td>
+ <td class="cBase cGridControlBox">
+ <img src="button_neu.gif" id="cmdAdd" name="-add" title="Zeile Hinzuf&uuml;gen" onclick="appendRow('[+$self->{'appendline_for_js'}+]')">
+ <img src="button_loeschen.gif" id="cmdDelete" name="-delete" title="Markierte Zeile L&ouml;schen" onclick="delete_from_form('[+$self->{'appendline_for_js'}+]')">
+ </td>
+ </tr>
+</table>
+[$ endsub $]
+
+[.# ################################################################################################
+ draw_table_id Zeigt die DOM Id der Tabelle an
+ ################################################################################################ #]
+
+[$ sub draw_table_id $][- ($self) = @_;-][+$self -> {id} +][$ endsub $]
+[# #--- draw_title ----# #]
+
+
+
+[.# ################################################################################################
+ show Erzeugt eine dynamische Tabelle
+
+ in objektspezifische Grid-Daten Struktur :
+
+ gridfields = Felder der Grid-Tabelle (angelehnt an das fields Format)
+ griddata = Datensatz mit den Werten der Tabelle
+ initdata = Datensatz mit den initialen Werten der Tabelle
+ names2display = (optional) Arrayref mit den Titeln des Tabellenkopfes
+ title = Titel der Grid-Tabelle
+ trclass = css Klasse der Tabellenzeilen
+ hiddentrclass = (optional) css Klasse für versteckte Tabellenfelder
+ ################################################################################################ #]
+
+[$ sub showgrid $]
+[.-
+($self) = @_;
+
+$self -> init() ;
+$epreq -> {'onSubmitLdapData'} = $self -> onSubmit ;
+
+-]
+
+[.#
+<link rel="stylesheet" type="text/css" href="/grid.css">
+<link rel="stylesheet" type="text/css" href="/base.css">
+<SCRIPT src="/js/TableCtrl.js"></SCRIPT>
+#]
+
+[- $self->show_grid_title; -]
+<table class="cBase cGridTable" id="[- $self->draw_table_id; -]" name="[- $self->draw_table_id; -]">
+[- $self->draw_grid_header; -]
+[- $self-> draw_grid_table; -]
+</table>
+
+[- $self->draw_auto_table;-]
+[- $self->draw_additional_div; -]
+
+<div id="hidden_table_container[- $self->draw_table_id; -]" class="cGridHidden">
+
+<table id="hidden[- $self->draw_table_id; -]" class="cGridHidden">
+[- $self-> draw_grid_table(1); -]
+</table>
+</div>
+
+<div id="temp[- $self->draw_table_id; -]">
+</div>
+
+<SCRIPT language="javascript">
+init('[- $self->draw_table_id; -]');
+</SCRIPT>
+
+[$endsub$]
+[# #--- show ----# #]
+
+
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::grid - A grid control inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+Used to create a grid control inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'grid'
+
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/info.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/info.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/info.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/info.pm Fri Dec 9 10:15:54 2005
@@ -1,81 +1,81 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::info ;
-
-use strict ;
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[.$ sub show ($self, $data)
-
-my $span = ($self->{width_percent}) ;
-$]
-<td class="cBase cInfoBox" colspan="[+ $span +]">[+ $self->{text} +]</td>
-[$endsub$]
-
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::blank - A info area inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'info',
- text => 'blabla'
- }
-
-=head1 DESCRIPTION
-
-Used to create a info area with optional text inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'info'
-
-=head3 text (optional)
-
-Could be used to give a text that should be displayed inside the blank area
-
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::info ;
+
+use strict ;
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[.$ sub show ($self, $data)
+
+my $span = ($self->{width_percent}) ;
+$]
+<td class="cBase cInfoBox" colspan="[+ $span +]">[+ $self->{text} +]</td>
+[$endsub$]
+
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::blank - A info area inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'info',
+ text => 'blabla'
+ }
+
+=head1 DESCRIPTION
+
+Used to create a info area with optional text inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'info'
+
+=head3 text (optional)
+
+Could be used to give a text that should be displayed inside the blank area
+
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/input.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/input.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/input.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/input.pm Fri Dec 9 10:15:54 2005
@@ -1,92 +1,93 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::input ;
-
-use strict ;
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show_control - output the control
-#]
-
-[.$ sub show_control ($self)
-$self -> {size} ||= 80 / ($self -> {width} || 2) ;
-$]
-
-<input type="text" class="cBase cControl" name="[+ $self->{name} +]"
-[$if $self -> {size} $]size="[+ $self->{size} +]"[$endif$]
-[$if $self -> {maxlength} $]size="[+ $self->{maxlength} +]"[$endif$]
->
-[$endsub$]
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::input - A text input control inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'input',
- text => 'blabla',
- name => 'foo',
- size => 10,
- }
-
-=head1 DESCRIPTION
-
-Used to create an input control inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'input'
-
-=head3 text
-
-Will be used as label for the text input control
-
-=head3 size
-
-Gives the size in characters
-
-=head3 maxlength
-
-Gives the maximun length in characters
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::input ;
+
+use strict ;
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show_control - output the control
+#]
+
+[.$ sub show_control ($self)
+$self -> {size} ||= 80 / ($self -> {width} || 2) ;
+$]
+
+<input type="text" class="cBase cControl" name="[+ $self->{name} +]"
+[$if $self -> {size} $]size="[+ $self->{size} +]"[$endif$]
+[$if $self -> {maxlength} $]maxlength="[+ $self->{maxlength} +]"[$endif$]
+>
+[$endsub$]
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::input - A text input control inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'input',
+ text => 'blabla',
+ name => 'foo',
+ size => 10,
+ maxlength => 50,
+ }
+
+=head1 DESCRIPTION
+
+Used to create an input control inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'input'
+
+=head3 text
+
+Will be used as label for the text input control
+
+=head3 size
+
+Gives the size in characters
+
+=head3 maxlength
+
+Gives the maximum possible input length in characters
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/label.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/label.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/label.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/label.pm Fri Dec 9 10:15:54 2005
@@ -1,81 +1,81 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::label ;
-
-use strict ;
-use base 'Embperl::Form::Control' ;
-
-use Embperl::Inline ;
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show - output the control
-#]
-
-[.$ sub show ($self, $data)
-
-my $span = ($self->{width_percent}) ;
-$]
-<td class="cBase cLabelBox" colspan="[+ $span +]">[+ $self->{text} +]</td>
-[$endsub$]
-
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::blank - A label area inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'label',
- text => 'blabla'
- }
-
-=head1 DESCRIPTION
-
-Used to create a label area with optional text inside an Embperl Form.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'label'
-
-=head3 text (optional)
-
-Could be used to give a text that should be displayed inside the blank area
-
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::label ;
+
+use strict ;
+use base 'Embperl::Form::Control' ;
+
+use Embperl::Inline ;
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show - output the control
+#]
+
+[.$ sub show ($self, $data)
+
+my $span = ($self->{width_percent}) ;
+$]
+<td class="cBase cLabelBox" colspan="[+ $span +]">[+ $self->{text} +]</td>
+[$endsub$]
+
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::label - A label area inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'label',
+ text => 'blabla'
+ }
+
+=head1 DESCRIPTION
+
+Used to create a label area with optional text inside an Embperl Form.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'label'
+
+=head3 text (optional)
+
+Could be used to give a text that should be displayed inside the blank area
+
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+

Modified: perl/embperl/trunk/Embperl/Form/Control/number.pm
URL: http://svn.apache.org/viewcvs/perl/embperl/trunk/Embperl/Form/Control/number.pm?rev=355574&r1=355573&r2=355574&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/number.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/number.pm Fri Dec 9 10:15:54 2005
@@ -1,98 +1,96 @@
-
-###################################################################################
-#
-# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
-#
-# You may distribute under the terms of either the GNU General Public
-# License or the Artistic License, as specified in the Perl README file.
-#
-# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-# $Id$
-#
-###################################################################################
-
-package Embperl::Form::Control::number ;
-
-use strict ;
-use base 'Embperl::Form::Control::input' ;
-
-use Embperl::Inline ;
-
-1 ;
-
-__EMBPERL__
-
-[# ---------------------------------------------------------------------------
-#
-# show_control - output the control
-#]
-
-[.$ sub show_control ($self)
-
- $self->{size} ||= 10 ;
-$]
-[- $self -> SUPER::show_control ;
--]
-[+ do { use Data::Dumper ; Dumper (\@ISA) }+]
-[$if ($self->{unit}) $][+ $self ->{unit} +][$endif$] ;
-[$endsub$]
-
-__END__
-
-=pod
-
-=head1 NAME
-
-Embperl::Form::Control::number - A numeric input control with optional unit inside an Embperl Form
-
-
-=head1 SYNOPSIS
-
- {
- type => 'input',
- text => 'blabla',
- name => 'foo',
- unit => 'sec',
- }
-
-=head1 DESCRIPTION
-
-Used to create a numeric input control inside an Embperl Form.
-Optionaly it can display an unit after the input field.
-See Embperl::Form on how to specify parameters.
-
-=head2 PARAMETER
-
-=head3 type
-
-Needs to be 'number'
-
-=head3 text
-
-Will be used as label for the numeric input control
-
-=head3 size
-
-Gives the size in characters. (Default: 10)
-
-=head3 maxlength
-
-Gives the maximun length in characters
-
-=head3 unit
-
-Gives a string that should be displayed right of the input field.
-
-
-=head1 Author
-
-G. Richter (richter [at] dev)
-
-=head1 See Also
-
-perl(1), Embperl, Embperl::Form
-
-
+
+###################################################################################
+#
+# Embperl - Copyright (c) 1997-2005 Gerald Richter / ecos gmbh www.ecos.de
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+#
+# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# $Id$
+#
+###################################################################################
+
+package Embperl::Form::Control::number ;
+
+use strict ;
+use base 'Embperl::Form::Control::input' ;
+
+use Embperl::Inline ;
+
+1 ;
+
+__EMBPERL__
+
+[# ---------------------------------------------------------------------------
+#
+# show_control - output the control
+#]
+
+[.$ sub show_control ($self)
+
+ $self->{size} ||= 10 ;
+$]
+[- $self -> SUPER::show_control ; -]
+[$if ($self->{unit}) $][+ $self ->{unit} +][$endif$] ;
+[$endsub$]
+
+__END__
+
+=pod
+
+=head1 NAME
+
+Embperl::Form::Control::number - A numeric input control with optional unit inside an Embperl Form
+
+
+=head1 SYNOPSIS
+
+ {
+ type => 'input',
+ text => 'blabla',
+ name => 'foo',
+ unit => 'sec',
+ }
+
+=head1 DESCRIPTION
+
+Used to create a numeric input control inside an Embperl Form.
+Optionaly it can display an unit after the input field.
+See Embperl::Form on how to specify parameters.
+
+=head2 PARAMETER
+
+=head3 type
+
+Needs to be 'number'
+
+=head3 text
+
+Will be used as label for the numeric input control
+
+=head3 size
+
+Gives the size in characters. (Default: 10)
+
+=head3 maxlength
+
+Gives the maximun length in characters
+
+=head3 unit
+
+Gives a string that should be displayed right of the input field.
+
+
+=head1 Author
+
+G. Richter (richter [at] dev)
+
+=head1 See Also
+
+perl(1), Embperl, Embperl::Form
+
+



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe [at] perl
For additional commands, e-mail: embperl-cvs-help [at] perl

ModPerl embperl-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.