From a25ac4907df1aca0db5fd0017b96e5d0bc5eadf1 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 26 Jan 2007 16:04:44 +0000 Subject: [PATCH] =?utf8?q?M=C3=B6glichkeit=20eingebaut,=20beim=20Versenden?= =?utf8?q?=20von=20Emails=20den=20Namen=20f=C3=BCr=20den=20Dateianhang=20s?= =?utf8?q?elber=20festzulegen.=20Er=20ist=20mit=20"Vorgangstyp=5FVorgangsn?= =?utf8?q?ummer.ext"=20vorbelegt,=20also=20z.B.=20"Rechnung=5F15.pdf".=20A?= =?utf8?q?ttribute=20in=20HTML-Tags=20und=20Werte=20gequotet.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/io.pl | 123 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 93 insertions(+), 30 deletions(-) diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index c1d5bfe08..4a094d2c1 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1280,8 +1280,10 @@ sub e_mail { } if ($myconfig{role} eq 'admin') { $bcc = qq| - | . $locale->text('Bcc') . qq| - + + | . $locale->text('Bcc') . qq| + + |; } @@ -1301,44 +1303,105 @@ sub e_mail { $form->{oldmedia} = $form->{media}; $form->{media} = "email"; + my %formname_translations = + ( + "bin_list" => $locale->text('Bin List'), + "credit_note" => $locale->text('Credit Note'), + "invoice" => $locale->text('Invoice'), + "packing_list" => $locale->text('Packing List'), + "pick_list" => $locale->text('Pick List'), + "proforma" => $locale->text('Proforma Invoice'), + "purchase_order" => $locale->text('Purchase Order'), + "request_quotation" => $locale->text('RFQ'), + "sales_order" => $locale->text('Confirmation'), + "sales_quotation" => $locale->text('Quotation'), + "storno_invoice" => $locale->text('Storno Invoice'), + "storno_packing_list" => $locale->text('Storno Packing List'), + ); + + my $attachment_filename = $formname_translations{$form->{"formname"}}; + my $prefix; + + if ($form->{"type"} =~ /invoice/) { + $prefix = "inv"; + } elsif ($form->{"type"} =~ /_quotation$/) { + $prefix = "quo"; + } else { + $prefix = "ord"; + } + + if ($attachment_filename && $form->{"${prefix}number"}) { + $attachment_filename .= "_" . $form->{"${prefix}number"} . + ($form->{"format"} =~ /pdf/i ? ".pdf" : + $form->{"format"} =~ /postscript/i ? ".ps" : + $form->{"format"} =~ /opendocument/i ? ".odt" : + $form->{"format"} =~ /html/i ? ".html" : ""); + $attachment_filename =~ s/ /_/g; + my %umlaute = + ( + "ä" => "ae", "ö" => "oe", "ü" => "ue", + "Ä" => "Ae", "Ö" => "Oe", "Ü" => "Ue", + "ß" => "ss" + ); + map({ $attachment_filename =~ s/$_/$umlaute{$_}/g; } keys(%umlaute)); + } else { + $attachment_filename = ""; + } + + if ($form->{"email"}) { + $form->{"fokus"} = "Form.subject"; + } else { + $form->{"fokus"} = "Form.email"; + } $form->header; print qq| - + -
{script}> + - - - +
$title
+ + @@ -1354,21 +1417,21 @@ sub e_mail { # save all other variables foreach $key (keys %$form) { $form->{$key} =~ s/\"/"/g; - print qq|\n|; + print qq|\n|; } print qq| - +
$title
- - - - - - - - - - - $bcc - +
| . $locale->text('To') . qq|| . $locale->text('Cc') . qq|
| . $locale->text('Subject') . qq|
+ + + + + + + + + $bcc + + + + + + +
| . $locale->text('To') . qq|
| . $locale->text('Cc') . qq|
| . $locale->text('Subject') . qq|
| . $locale->text('Attachment name') . + qq|
- - - - - - - +
| . $locale->text('Message') . qq|
+ + + + + +
| . $locale->text('Message') . qq|


- +
-
-- 2.20.1