+ my @variable;
+ my $onload; # note! this sub is mostly called over a javascript invocation, and it's unlikey that onload is set.
+
+ foreach my $item (split m/;/, $variable_string) {
+ next unless $item =~ m/^ \s* (\w+) \s* = \s* (\w+) \s* (\w+) \s* $/x;
+ push @variable, {
+ description => $1,
+ name => $2,
+ unit => $3,
+ };
+ }
+
+ my @header_sort = qw(variable value unit);
+ my %header_title = (
+ variable => $locale->text("Variable"),
+ value => $locale->text("Value"),
+ unit => $locale->text("Unit"),
+ );
+ my @header = map +{
+ column_title => $header_title{$_},
+ column => $_,
+ }, @header_sort;
+
+ $form->{formel} = $formel;
+ $form->{title} = $locale->text("Please enter values");
+ $form->header();
+ print $form->parse_html_template("generic/calculate_qty", { "HEADER" => \@header,
+ "VARIABLES" => \@variable,
+ "onload" => $onload });
+
+ $main::lxdebug->leave_sub();
+}
+
+# -------------------------------------------------------------------------
+
+sub set_longdescription {
+ $main::lxdebug->enter_sub();
+
+ my $form = $main::form;
+ my $locale = $main::locale;
+
+ $form->{title} = $locale->text("Enter longdescription");
+ $form->header();
+ print $form->parse_html_template("generic/set_longdescription");
+
+ $main::lxdebug->leave_sub();
+}
+
+# -------------------------------------------------------------------------
+
+sub H {
+ return $main::locale->quote_special_chars('HTML', $_[0]);
+}
+
+sub Q {
+ return $main::locale->quote_special_chars('URL@HTML', $_[0]);
+}
+
+sub E {
+ return $main::form->escape($_[0]);
+}
+
+sub NTI {
+ my ($element) = @_;
+
+ $element =~ s/tabindex\s*=\s*"\d+"//;
+ return $element;
+}
+
+sub format_dates {
+ return $::form->format_dates(@_);
+}
+
+sub reformat_numbers {
+ return $::form->reformat_numbers(@_);
+}
+
+# -------------------------------------------------------------------------
+
+sub show_history {
+ $main::lxdebug->enter_sub();
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+ my $locale = $main::locale;