X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a83fd9027e7719a82eaf23139299486aef57043e..487d4f1f6ccd3e22c05469f679bf5d0685914611:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index c16353284..f82a70f66 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -412,14 +412,14 @@ function fokus(){document.$self->{fokus}.focus();} $main::lxdebug->leave_sub(); } -# write Trigger JavaScript-Code ($qty = 1 - only one Trigger) +# write Trigger JavaScript-Code ($qty = quantity of Triggers) +# changed it to accept an arbitrary number of triggers - sschoeling sub write_trigger { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $qty, - $inputField_1, $align_1, $button_1, - $inputField_2, $align_2, $button_2) - = @_; + my $self = shift; + my $myconfig = shift; + my $qty = shift; # set dateform for jsscript # default @@ -448,35 +448,21 @@ sub write_trigger { } } - $trigger_1 = qq| + while ($#_ >= 2) { + push @triggers, qq| Calendar.setup( { - inputField : "$inputField_1", + inputField : "|.(shift).qq|", ifFormat :"$ifFormat", - align : "$align_1", - button : "$button_1" + align : "|.(shift).qq|", + button : "|.(shift).qq|" } ); |; - - if ($qty == 2) { - $trigger_2 = qq| - Calendar.setup( - { - inputField : "$inputField_2", - ifFormat :"$ifFormat", - align : "$align_2", - button : "$button_2" - } - ); - |; } $jsscript = qq| |; @@ -1631,7 +1617,7 @@ sub create_links { # now get the account numbers $query = - qq|SELECT c.accno, SUBSTRING(c.description,1,50) as description, c.link, c.taxkey_id + qq|SELECT c.accno, c.description, c.link, c.taxkey_id FROM chart c WHERE c.link LIKE '%$module%' ORDER BY c.accno|;