X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/2794f75fd58d78a1229b7b0d62d5fcb958d241b9..487d4f1f6ccd3e22c05469f679bf5d0685914611:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index c70e35ab1..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| |;