X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcommon.pl;h=97391b2a9e2f7af31d3dda8bcac10ce6c62bfb91;hb=2cf0b165a479c86d378e795ca5d0745a901f422f;hp=2c44c094ac3f138f09ef5b8086b2f3fb6d40f47d;hpb=1d6a8f5f46dd9d8c9bc53b78528957db10ef7a11;p=kivitendo-erp.git diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index 2c44c094a..97391b2a9 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -9,6 +9,7 @@ # ###################################################################### +use SL::Form; use YAML; use SL::Common; @@ -17,7 +18,6 @@ sub save_form { $lxdebug->enter_sub(); my $yaml = new YAML; - $yaml->Indent(1); my $old_form = $yaml->dump($form); $old_form =~ s|!|!!|g; $old_form =~ s|\n|!n|g; @@ -37,7 +37,8 @@ sub restore_form { $old_form =~ s|!r|\r|g; $old_form =~ s|!n|\n|g; $old_form =~ s|!!|!|g; - $form = YAML::Load($old_form); + my $new_form = YAML::Load($old_form); + map({ $form->{$_} = $new_form->{$_}; } keys(%{$new_form})); $lxdebug->leave_sub(); } @@ -528,4 +529,19 @@ sub reformat_numbers { $lxdebug->leave_sub(); } +sub show_history { + $lxdebug->enter_sub(); + my $dbh = $form->dbconnect(\%myconfig); + + $form->{title} = $locale->text("History"); + $form->header(); + print $form->parse_html_template( "common/show_history", { + "DATEN" => $form->get_history($dbh,$form->{input_name}), + "SUCCESS" => ($form->get_history($dbh,$form->{input_name}) ne "0") + } ); + + $dbh->disconnect(); + $lxdebug->leave_sub(); +} + 1;