X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=SL%2FForm.pm;h=1c03e107ffa8f629ad223c599510c26e3608dcb1;hb=0f2d4920a798878ab2ff60ba11b190854c23c5fb;hp=9253f419ddfcff32e637d4bd0789e45b87b4b56e;hpb=85f2addd9be287bfc2226e3a08c29efc0c0131d2;p=kivitendo-erp.git
diff --git a/SL/Form.pm b/SL/Form.pm
index 9253f419d..1c03e107f 100644
--- a/SL/Form.pm
+++ b/SL/Form.pm
@@ -1,4 +1,4 @@
-#=====================================================================
+#====================================================================
# LX-Office ERP
# Copyright (C) 2004
# Based on SQL-Ledger Version 2.1.9
@@ -37,6 +37,8 @@
package Form;
+use HTML::Template;
+
sub _input_to_hash {
$main::lxdebug->enter_sub();
@@ -140,8 +142,7 @@ sub new {
$self->{action} = lc $self->{action};
$self->{action} =~ s/( |-|,|#)/_/g;
- $self->{version} = "2.1.2";
- $self->{dbversion} = "2.1.2";
+ $self->{version} = "2.3.0";
$main::lxdebug->leave_sub();
@@ -192,6 +193,48 @@ sub unescape {
return $str;
}
+sub quote {
+ my ($self, $str) = @_;
+
+ if ($str && !ref($str)) {
+ $str =~ s/\"/"/g;
+ }
+
+ $str;
+
+}
+
+sub unquote {
+ my ($self, $str) = @_;
+
+ if ($str && !ref($str)) {
+ $str =~ s/"/\"/g;
+ }
+
+ $str;
+
+}
+
+sub hide_form {
+ my $self = shift;
+
+ if (@_) {
+ for (@_) {
+ print qq|\n|;
+ }
+ } else {
+ delete $self->{header};
+ for (sort keys %$self) {
+ print qq|\n|;
+ }
+ }
+
+}
+
sub error {
$main::lxdebug->enter_sub();
@@ -201,17 +244,7 @@ sub error {
$msg =~ s/\n/
/g;
$self->header;
-
- print qq|
-
$msg - - -