Revision d7f06042
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
567 | 567 |
$form->{fokus} = "invoice.customer"; |
568 | 568 |
|
569 | 569 |
# use JavaScript Calendar or not |
570 |
$form->{jsscript} = $jscalendar;
|
|
570 |
$form->{jsscript} = 1;
|
|
571 | 571 |
$jsscript = ""; |
572 | 572 |
if ($form->{type} eq "credit_note") { |
573 |
if ($form->{jsscript}) { |
|
574 |
|
|
575 |
# with JavaScript Calendar |
|
576 |
$button1 = qq| |
|
577 |
<td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"> |
|
578 |
<input type="button" name="invdate" id="trigger1" value="| |
|
579 |
. $locale->text('button') . qq|"></td>|; |
|
580 |
|
|
581 |
#write Trigger |
|
582 |
$jsscript = |
|
583 |
Form->write_trigger(\%myconfig, "1", |
|
584 |
"invdate", "BL", |
|
585 |
"trigger1"); |
|
586 |
} else { |
|
587 |
|
|
588 |
# without JavaScript Calendar |
|
589 |
$button1 = |
|
590 |
qq|<td><input name="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"></td>|; |
|
591 |
$button2 = |
|
592 |
qq|<td width="13"><input name="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}"></td>|; |
|
593 |
} |
|
573 |
$button1 = qq| |
|
574 |
<td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"> |
|
575 |
<input type="button" name="invdate" id="trigger1" value="| |
|
576 |
. $locale->text('button') . qq|"></td>|; |
|
577 |
|
|
578 |
#write Trigger |
|
579 |
$jsscript = |
|
580 |
Form->write_trigger(\%myconfig, "1", |
|
581 |
"invdate", "BL", |
|
582 |
"trigger1"); |
|
594 | 583 |
} else { |
595 |
if ($form->{jsscript}) { |
|
596 |
|
|
597 |
# with JavaScript Calendar |
|
598 |
$button1 = qq| |
|
599 |
<td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"> |
|
600 |
<input type="button" name="invdate" id="trigger1" value="| |
|
601 |
. $locale->text('button') . qq|"></td> |
|
602 |
|; |
|
603 |
$button2 = qq| |
|
604 |
<td width="13"><input name="duedate" id="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\"> |
|
605 |
<input type="button" name="duedate" id="trigger2" value="| |
|
606 |
. $locale->text('button') . qq|"></td></td> |
|
607 |
|; |
|
608 |
$button3 = qq| |
|
609 |
<td width="13"><input name="deliverydate" id="deliverydate" size="11" title="$myconfig{dateformat}" value="$form->{deliverydate}" onBlur=\"check_right_date_format(this)\"> |
|
610 |
<input type="button" name="deliverydate" id="trigger3" value="| |
|
611 |
. $locale->text('button') . qq|"></td></td> |
|
584 |
$button1 = qq| |
|
585 |
<td><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"> |
|
586 |
<input type="button" name="invdate" id="trigger1" value="| |
|
587 |
. $locale->text('button') . qq|"></td> |
|
612 | 588 |
|; |
613 |
|
|
614 |
#write Trigger |
|
615 |
$jsscript = |
|
616 |
Form->write_trigger(\%myconfig, "3", |
|
617 |
"invdate", "BL", |
|
618 |
"trigger1", "duedate", |
|
619 |
"BL", "trigger2", |
|
620 |
"deliverydate", "BL", |
|
621 |
"trigger3"); |
|
622 |
} else { |
|
623 |
|
|
624 |
# without JavaScript Calendar |
|
625 |
$button1 = |
|
626 |
qq|<td><input name="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\"></td>|; |
|
627 |
$button2 = |
|
628 |
qq|<td width="13"><input name=duedate size=11 title="$myconfig{dateformat}" value=$form->{duedate} onBlur=\"check_right_date_format(this)\"></td>|; |
|
629 |
} |
|
589 |
$button2 = qq| |
|
590 |
<td width="13"><input name="duedate" id="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\"> |
|
591 |
<input type="button" name="duedate" id="trigger2" value="| |
|
592 |
. $locale->text('button') . qq|"></td></td> |
|
593 |
|; |
|
594 |
$button3 = qq| |
|
595 |
<td width="13"><input name="deliverydate" id="deliverydate" size="11" title="$myconfig{dateformat}" value="$form->{deliverydate}" onBlur=\"check_right_date_format(this)\"> |
|
596 |
<input type="button" name="deliverydate" id="trigger3" value="| |
|
597 |
. $locale->text('button') . qq|"></td></td> |
|
598 |
|; |
|
599 |
|
|
600 |
#write Trigger |
|
601 |
$jsscript = |
|
602 |
Form->write_trigger(\%myconfig, "3", |
|
603 |
"invdate", "BL", |
|
604 |
"trigger1", "duedate", |
|
605 |
"BL", "trigger2", |
|
606 |
"deliverydate", "BL", |
|
607 |
"trigger3"); |
|
630 | 608 |
} |
609 |
|
|
631 | 610 |
if ($form->{resubmit} && ($form->{format} eq "html")) { |
632 | 611 |
$onload = |
633 | 612 |
qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()|; |
Auch abrufbar als: Unified diff
Lx-Office verlangt inzwischen an sehr vielen Stellen, dass Javascript zwingend angeschaltet ist, weil es ansonsten schlicht nicht mehr funktioniert. Deswegen sind Abfragen auf die Verwendung des Javascript-Kalenders reine Platzverschwendung und blähen den Code unnötig auf.