From be4e11d36f40d90622fdf35eb07ab207422b5455 Mon Sep 17 00:00:00 2001 From: Thomas Kasulke Date: Fri, 20 Apr 2007 10:34:17 +0000 Subject: [PATCH] =?utf8?q?=C3=9Cberpr=C3=BCfen=20auf=20korrekte=20Eingaben?= =?utf8?q?=20eingepflegt.=20(common.js=20check=5Fright=5Fdate=5Fformat=20u?= =?utf8?q?sw)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ap.pl | 34 ++++++++++++++++++---------------- bin/mozilla/ar.pl | 40 +++++++++++++++++++++++----------------- bin/mozilla/bp.pl | 15 ++++++++------- bin/mozilla/cp.pl | 14 ++++++++------ bin/mozilla/dn.pl | 37 +++++++++++++++++++++++-------------- bin/mozilla/gl.pl | 22 ++++++++++++---------- bin/mozilla/ir.pl | 23 +++++++++++++---------- bin/mozilla/is.pl | 27 ++++++++++++++------------- bin/mozilla/rc.pl | 10 ++++++---- bin/mozilla/rp.pl | 20 +++++++++++--------- 10 files changed, 136 insertions(+), 106 deletions(-) diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index cd5eda594..c5393a7e5 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -461,12 +461,12 @@ selectvendor } | # with JavaScript Calendar $button1 = qq| - {transdate}> $readonly + {transdate} onBlur=\"check_right_date_format(this)\"> $readonly text('button') . qq|> |; $button2 = qq| - {duedate}> $readonly + {duedate} onBlur=\"check_right_date_format(this)\"> $readonly text('button') . qq|> |; @@ -479,15 +479,16 @@ selectvendor } | # without JavaScript Calendar $button1 = - qq|{transdate}> $readonly|; + qq|{transdate} onBlur=\"check_right_date_format(this)\"> $readonly|; $button2 = - qq|{duedate}> $readonly|; + qq|{duedate} onBlur=\"check_right_date_format(this)\"> $readonly|; } - + $form->{javascript} .= qq||; $form->header; - + $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - +
{script}> @@ -775,12 +776,12 @@ $jsscript |; $column_data{"paid_$i"} = - qq|{"paid_$i"}>|; + qq|{"paid_$i"} onBlur=\"check_right_number_format(this)\">|; $column_data{"AP_paid_$i"} = qq|${selectAP_paid}|; $column_data{"exchangerate_$i"} = qq|$exchangerate|; $column_data{"datepaid_$i"} = - qq|{"datepaid_$i"}> + qq|{"datepaid_$i"} onBlur=\"check_right_date_format(this)\"> |; $column_data{"source_$i"} = qq||; @@ -1207,12 +1208,12 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; @@ -1225,9 +1226,9 @@ sub search { # without JavaScript Calendar $button1 = qq| - |; + |; $button2 = qq| - |; + |; } $form->get_lists("projects" => { "key" => "ALL_PROJECTS", @@ -1242,11 +1243,12 @@ sub search { my $projectnumber = NTI($cgi->popup_menu('-name' => 'project_id', '-values' => \@values, '-labels' => \%labels)); - + $form->{javascript} .= qq||; $form->header; - + $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index eedf53838..bb46fca55 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -102,7 +102,7 @@ sub edit { # show history button $form->{javascript} = qq||; #/show hhistory button - + $form->{javascript} .= qq||; $form->{title} = "Edit"; &create_links; @@ -322,7 +322,7 @@ sub form_header { # show history button js $form->{javascript} .= qq||; #/show history button js - + $form->{javascript} .= qq||; $readonly = ($form->{id}) ? "readonly" : ""; $form->{radier} = @@ -476,12 +476,12 @@ selectcustomer}| # with JavaScript Calendar $button1 = qq| - {transdate}> + {transdate} onBlur=\"check_right_date_format(this)\"> text('button') . qq|> |; $button2 = qq| - {duedate}> + {duedate} onBlur=\"check_right_date_format(this)\"> text('button') . qq|> |; @@ -494,15 +494,17 @@ selectcustomer}| # without JavaScript Calendar $button1 = - qq|{transdate}>|; + qq|{transdate} onBlur=\"check_right_date_format(this)\">|; $button2 = - qq|{duedate}>|; + qq|{duedate} onBlur=\"check_right_date_format(this)\">|; } $form->header; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> @@ -787,12 +789,12 @@ $jsscript |; $column_data{paid} = - qq|{"paid_$i"}>|; + qq|{"paid_$i"} onBlur=\"check_right_number_format(this)\">|; $column_data{AR_paid} = qq|${selectAR_paid}|; $column_data{exchangerate} = qq|$exchangerate|; $column_data{datepaid} = - qq|{"datepaid_$i"}> + qq|{"datepaid_$i"} onBlur=\"check_right_date_format(this)\"> |; $column_data{source} = qq||; @@ -1215,7 +1217,9 @@ sub search { | if $form->{selectdepartment}; $form->{title} = $locale->text('AR Transactions'); - + + $form->{javascript} .= qq||; + # use JavaScript Calendar or not $form->{jsscript} = $jscalendar; $jsscript = ""; @@ -1223,12 +1227,12 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; @@ -1241,9 +1245,9 @@ sub search { # without JavaScript Calendar $button1 = qq| - |; + |; $button2 = qq| - |; + |; } $form->get_lists("projects" => { "key" => "ALL_PROJECTS", @@ -1261,9 +1265,11 @@ sub search { $form->{fokus} = "search.customer"; $form->header; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 27674e25c..6e7d9277a 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -161,12 +161,12 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; @@ -179,15 +179,16 @@ sub search { # without JavaScript Calendar $button1 = qq| - |; + |; $button2 = qq| - |; + |; } - + $form->{javascript} .= qq||; $form->header; - + $onload = qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 7eb702fad..5a1d2e3bc 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -184,7 +184,7 @@ sub form_header { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; @@ -196,15 +196,17 @@ sub form_header { # without JavaScript Calendar $button1 = qq| - |; + |; } - + $form->{javascript} .= qq||; $form->header; $arap = lc $form->{ARAP}; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> @@ -306,7 +308,7 @@ sub form_header { | . $locale->text('Amount') . qq| format_amount(\%myconfig, $form->{amount}, 2) . qq|> + . $form->format_amount(\%myconfig, $form->{amount}, 2) . qq| onBlur=\"check_right_number_format(this)\"> diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 85f28b0b3..725aed997 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -271,7 +271,7 @@ sub add { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; @@ -283,12 +283,16 @@ sub add { # without JavaScript Calendar $button1 = - qq||; + qq||; } $form->{fokus} = "search.customer"; + $form->{javascript} .= qq||; $form->header; + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> @@ -687,22 +691,22 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; $button3 = qq| - + text('button') . qq|> |; $button4 = qq| - + text('button') . qq|> |; @@ -714,19 +718,24 @@ sub search { # without JavaScript Calendar $button1 = - qq||; + qq||; $button2 = - qq||; - $button1 = - qq||; - $button1 = - qq||; + qq||; + $button3 = + qq||; + $button4 = + qq||; } $form->{fokus} = "search.customer"; + $form->{javascript} .= qq||; $form->header; + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; + print qq| - + {script}> diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 464fb0162..1ffcc5f02 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -233,12 +233,12 @@ sub search { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; $button2 = qq| - + text('button') . qq|> |; @@ -251,15 +251,17 @@ sub search { # without JavaScript Calendar $button1 = - qq||; + qq||; $button2 = - qq||; + qq||; } - + $form->{javascript} .= qq||; $form->header; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> @@ -1296,7 +1298,7 @@ sub form_header { # with JavaScript Calendar $button1 = qq| - + text('button') . qq|> |; @@ -1308,7 +1310,7 @@ sub form_header { # without JavaScript Calendar $button1 = - qq||; + qq||; } $form->header; @@ -1354,7 +1356,7 @@ sub form_header { - +
| . $locale->text('Buchungsdatum') . qq|{gldate} $readonly>{gldate} $readonly onBlur=\"check_right_date_format(this)\">
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 4f40da73f..ac8b955f2 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -357,12 +357,12 @@ onchange="document.getElementById('update_button').click();">| . # with JavaScript Calendar $button1 = qq| - {invdate}> + text('button') . qq|> |; $button2 = qq| - {duedate}> + text('button') . qq|> |; @@ -375,12 +375,13 @@ onchange="document.getElementById('update_button').click();">| . # without JavaScript Calendar $button1 = - qq|{invdate}>|; + qq||; $button2 = - qq|{duedate}>|; + qq||; } $form->{"javascript"} .= qq||; + $form->{"javascript"} .= qq||; $jsscript .= $form->write_trigger(\%myconfig, 2, @@ -388,9 +389,11 @@ onchange="document.getElementById('update_button').click();">| . "quodate", "BL", "trigger_quodate"); $form->header; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> @@ -483,12 +486,12 @@ onchange="document.getElementById('update_button').click();">| . | . $locale->text('Order Date') . qq| - + | . $locale->text('Quotation Date') . qq| - + @@ -755,12 +758,12 @@ sub form_footer { |; $column_data{"paid_$i"} = - qq|{"paid_$i"}>|; + qq||; $column_data{"exchangerate_$i"} = qq|$exchangerate|; $column_data{"AP_paid_$i"} = qq||; $column_data{"datepaid_$i"} = - qq|{"datepaid_$i"}> + qq| |; $column_data{"source_$i"} = qq|{"source_$i"}>|; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 459e1b944..8d70586d3 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -531,7 +531,7 @@ onchange="document.getElementById('update_button').click();">| . # with JavaScript Calendar $button1 = qq| - + |; @@ -544,7 +544,7 @@ onchange="document.getElementById('update_button').click();">| . # without JavaScript Calendar $button1 = - qq||; + qq||; $button2 = qq||; } @@ -553,17 +553,17 @@ onchange="document.getElementById('update_button').click();">| . # with JavaScript Calendar $button1 = qq| - + |; $button2 = qq| - + |; $button3 = qq| - + |; @@ -580,9 +580,9 @@ onchange="document.getElementById('update_button').click();">| . # without JavaScript Calendar $button1 = - qq||; + qq||; $button2 = - qq|{duedate}>|; + qq|{duedate} onBlur=\"check_right_date_format(this)\">|; } } if ($form->{resubmit} && ($form->{format} eq "html")) { @@ -591,9 +591,10 @@ onchange="document.getElementById('update_button').click();">| . } elsif ($form->{resubmit}) { $onload = qq|document.invoice.submit()|; } else { - $onload = "fokus()"; + $onload = "focus()"; } - + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; $credittext = $locale->text('Credit Limit exceeded!!!'); if ($creditwarning) { $onload = qq|alert('$credittext')|; @@ -755,7 +756,7 @@ print qq| | . $locale->text('Order Date') . qq| - + @@ -764,7 +765,7 @@ print qq| | . $locale->text('Quotation Date') . qq| - + @@ -1041,12 +1042,12 @@ if ($form->{type} eq "credit_note") { $exchangerate .= qq||; $column_data{"paid_$i"} = - qq||; + qq||; $column_data{"exchangerate_$i"} = qq|$exchangerate|; $column_data{"AR_paid_$i"} = qq||; $column_data{"datepaid_$i"} = - qq|{"datepaid_$i"}> + qq| |; $column_data{"source_$i"} = qq||; diff --git a/bin/mozilla/rc.pl b/bin/mozilla/rc.pl index 6634aff6b..12c87c481 100644 --- a/bin/mozilla/rc.pl +++ b/bin/mozilla/rc.pl @@ -49,12 +49,14 @@ sub reconciliation { @{ $form->{PR} }; $form->{title} = $locale->text('Reconciliation'); - + $form->{javascript} .= qq||; $form->{"jsscript"} = 1; $form->header; + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; print qq| - + {script}> @@ -73,10 +75,10 @@ sub reconciliation { | . $locale->text('From') . qq| - + | . $locale->text('Until') . qq| - + diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 671099907..e365c3304 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -200,7 +200,7 @@ sub report { if ($name_1 eq "") { $button1 = qq| - |; + |; $button1_2 = qq| text('button') . qq|>|; @@ -210,12 +210,12 @@ sub report { Form->write_trigger(\%myconfig, "1", "$name_2", "BR", "$trigger_2"); } else { $button1 = qq| - |; + |; $button1_2 = qq| text('button') . qq|>|; $button2 = qq| - |; + |; $button2_2 = qq| text('button') . qq|> @@ -231,19 +231,21 @@ sub report { # without JavaScript Calendar if ($name_1 eq "") { $button1 = - qq||; + qq||; } else { $button1 = - qq||; + qq||; $button2 = - qq||; + qq||; } } - + $form->{javascript} .= qq||; $form->header; - + $onload = qq|focus()|; + $onload .= qq|;setupDateFormat('|. $myconfig{dateformat} .qq|', '|. $locale->text("Falsches Datumsformat!") .qq|')|; + $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|; print qq| - + {script}> -- 2.20.1