Revision 8ec984ac
Von Jan Büren vor mehr als 7 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1375 | 1375 |
return $subject; |
1376 | 1376 |
} |
1377 | 1377 |
|
1378 |
sub generate_email_body { |
|
1379 |
$main::lxdebug->enter_sub(); |
|
1380 |
my ($self) = @_; |
|
1381 |
# simple german and english will work grammatically (most european languages as well) |
|
1382 |
# Dear Mr Alan Greenspan: |
|
1383 |
# Sehr geehrte Frau Meyer, |
|
1384 |
# A l’attention de Mme Villeroy, |
|
1385 |
# Gentile Signora Ferrari, |
|
1386 |
my $body = ''; |
|
1387 |
|
|
1388 |
if ($self->{cp_id}) { |
|
1389 |
my $givenname = SL::DB::Contact->load_cached($self->{cp_id})->cp_givenname; # for qw(gender givename name); |
|
1390 |
my $name = SL::DB::Contact->load_cached($self->{cp_id})->cp_name; # for qw(gender givename name); |
|
1391 |
my $gender = SL::DB::Contact->load_cached($self->{cp_id})->cp_gender; # for qw(gender givename name); |
|
1392 |
my $mf = $gender eq 'f' ? 'female' : 'male'; |
|
1393 |
$body = GenericTranslations->get(translation_type => "salutation_$mf", language_id => $self->{language_id}); |
|
1394 |
$body .= ' ' . $givenname . ' ' . $name if $body; |
|
1395 |
} else { |
|
1396 |
$body = GenericTranslations->get(translation_type => "salutation_general", language_id => $self->{language_id}); |
|
1397 |
} |
|
1398 |
|
|
1399 |
return undef unless $body; |
|
1400 |
|
|
1401 |
$body .= GenericTranslations->get(translation_type =>"salutation_punctuation_mark", language_id => $self->{language_id}) . "\n"; |
|
1402 |
$body .= GenericTranslations->get(translation_type =>"preset_text_$self->{formname}", language_id => $self->{language_id}); |
|
1403 |
|
|
1404 |
$body = $main::locale->unquote_special_chars('HTML', $body); |
|
1405 |
|
|
1406 |
$main::lxdebug->leave_sub(); |
|
1407 |
return $body; |
|
1408 |
} |
|
1409 |
|
|
1378 | 1410 |
sub cleanup { |
1379 | 1411 |
$main::lxdebug->enter_sub(); |
1380 | 1412 |
|
locale/de/all | ||
---|---|---|
36 | 36 |
'...done' => '...fertig', |
37 | 37 |
'...on the TODO list' => '...auf der Aufgabenliste', |
38 | 38 |
'0% tax with taxkey' => '0% Steuer mit Steuerschlüssel ', |
39 |
'1)' => '1)', |
|
39 | 40 |
'1. Quarter' => '1. Quartal', |
40 | 41 |
'2 years' => '2 Jahre', |
41 | 42 |
'2. Quarter' => '2. Quartal', |
... | ... | |
3310 | 3311 |
'Time/cost estimate actions' => 'Aktionen für Kosten-/Zeitabschätzung', |
3311 | 3312 |
'Timerange' => 'Zeitraum', |
3312 | 3313 |
'Timestamp' => 'Uhrzeit', |
3314 |
'Tired of copying always nice phrases for this message? Click here to use the new preset message option!' => 'Müde vom vielen Copy & Paste aus vorherigen Anschreiben? Hier klicken, um E-Mail-Texte vorzudefinieren!', |
|
3313 | 3315 |
'Title' => 'Titel', |
3314 | 3316 |
'To' => 'An', |
3315 | 3317 |
'To (email)' => 'An', |
templates/webpages/common/_send_email_dialog.html | ||
---|---|---|
50 | 50 |
</tr> |
51 | 51 |
|
52 | 52 |
<tr valign="top"> |
53 |
<th align="right" nowrap>[% LxERP.t8("Message") %]</th> |
|
53 |
<th align="right" nowrap>[% LxERP.t8("Message") %] |
|
54 |
<sup> [% L.link("generictranslations.pl?action=edit_email_strings", "1)", title=LxERP.t8('Tired of copying always nice phrases for this message? Click here to use the new preset message option!'), target="_blank") %]</sup> |
|
55 |
</th> |
|
54 | 56 |
<td>[% L.textarea_tag("email_form.message", email_form.message, rows="15" cols="80" wrap="soft") %]</td> |
55 | 57 |
</tr> |
56 | 58 |
|
Auch abrufbar als: Unified diff
vergessene Backend-Funktion für E-Mail-Vorbelegung
Ferner eine Fußnote als Hinweis zur Vorbelegungs-Funktion gesetzt.