Revision bcd1d3af
Von Sven Schöling vor mehr als 17 Jahren hinzugefügt
bin/mozilla/io.pl | ||
---|---|---|
1256 | 1256 |
$form->{print_and_post} = 0; |
1257 | 1257 |
$form->{resubmit} = 0; |
1258 | 1258 |
} |
1259 |
if ($myconfig{role} eq 'admin') { |
|
1260 |
$bcc = qq| |
|
1261 |
<tr> |
|
1262 |
<th align="right" nowrap="true">| . $locale->text('Bcc') . qq|</th> |
|
1263 |
<td><input name="bcc" size="30" value="| . Q($form->{bcc}) . qq|"></td> |
|
1264 |
</tr> |
|
1265 |
|; |
|
1266 |
} |
|
1267 | 1259 |
|
1268 |
if ($form->{formname} =~ /(pick|packing|bin)_list/) { |
|
1269 |
$form->{email} = $form->{shiptoemail} if $form->{shiptoemail}; |
|
1270 |
} |
|
1260 |
$form->{email} = $form->{shiptoemail} if $form->{shiptoemail} && $form->{formname} =~ /(pick|packing|bin)_list/; |
|
1271 | 1261 |
|
1272 | 1262 |
if ($form->{"cp_id"} && !$form->{"email"}) { |
1273 | 1263 |
CT->get_contact(\%myconfig, $form); |
1274 | 1264 |
$form->{"email"} = $form->{"cp_email"}; |
1275 | 1265 |
} |
1276 | 1266 |
|
1277 |
$name = $form->{ $form->{vc} }; |
|
1278 |
$name =~ s/--.*//g; |
|
1279 |
$title = $locale->text('E-mail') . " $name"; |
|
1267 |
$form->{ $form->{vc} } =~ /--/; |
|
1268 |
$title = $locale->text('E-mail') . " $`"; |
|
1280 | 1269 |
|
1281 | 1270 |
$form->{oldmedia} = $form->{media}; |
1282 | 1271 |
$form->{media} = "email"; |
1283 | 1272 |
|
1284 |
my %formname_translations = |
|
1285 |
( |
|
1273 |
my %formname_translations = ( |
|
1286 | 1274 |
"bin_list" => $locale->text('Bin List'), |
1287 | 1275 |
"credit_note" => $locale->text('Credit Note'), |
1288 | 1276 |
"invoice" => $locale->text('Invoice'), |
... | ... | |
1295 | 1283 |
"sales_quotation" => $locale->text('Quotation'), |
1296 | 1284 |
"storno_invoice" => $locale->text('Storno Invoice'), |
1297 | 1285 |
"storno_packing_list" => $locale->text('Storno Packing List'), |
1298 |
);
|
|
1286 |
); |
|
1299 | 1287 |
|
1300 | 1288 |
my $attachment_filename = $formname_translations{$form->{"formname"}}; |
1301 | 1289 |
my $prefix; |
... | ... | |
1315 | 1303 |
$form->{"format"} =~ /opendocument/i ? ".odt" : |
1316 | 1304 |
$form->{"format"} =~ /html/i ? ".html" : ""); |
1317 | 1305 |
$attachment_filename =~ s/ /_/g; |
1318 |
my %umlaute = |
|
1319 |
( |
|
1320 |
"?" => "ae", "?" => "oe", "?" => "ue", |
|
1321 |
"?" => "Ae", "?" => "Oe", "?" => "Ue", |
|
1322 |
"?" => "ss" |
|
1323 |
); |
|
1324 |
map({ $attachment_filename =~ s/$_/$umlaute{$_}/g; } keys(%umlaute)); |
|
1306 |
my %umlaute = ( "?" => "ae", "?" => "oe", "?" => "ue", |
|
1307 |
"?" => "Ae", "?" => "Oe", "?" => "Ue", "?" => "ss"); |
|
1308 |
map { $attachment_filename =~ s/$_/$umlaute{$_}/g } keys %umlaute; |
|
1325 | 1309 |
} else { |
1326 | 1310 |
$attachment_filename = ""; |
1327 | 1311 |
} |
1328 | 1312 |
|
1329 |
if ($form->{"email"}) { |
|
1330 |
$form->{"fokus"} = "Form.subject"; |
|
1331 |
} else { |
|
1332 |
$form->{"fokus"} = "Form.email"; |
|
1333 |
} |
|
1313 |
$form->{"fokus"} = $form->{"email"} ? "Form.subject" : "Form.email"; |
|
1334 | 1314 |
$form->header; |
1335 | 1315 |
|
1336 |
print qq| |
|
1337 |
<body onload="fokus()"> |
|
1338 |
|
|
1339 |
<form name="Form" method="post" action="$form->{script}"> |
|
1316 |
my (@nh, %nh, @hiddenkeys); |
|
1317 |
@nh = qw(action email cc bcc subject message formname sendmode format header override); $nh{@nh} = (1)x@nh; |
|
1318 |
@hidden_keys = grep { !$nh{$_} } grep { !ref $form->{$_} } keys %$form; |
|
1340 | 1319 |
|
1341 |
<table width="100%"> |
|
1342 |
<tr class="listtop"> |
|
1343 |
<th class="listtop">$title</th> |
|
1344 |
</tr> |
|
1345 |
<tr height="5"></tr> |
|
1346 |
<tr> |
|
1347 |
<td> |
|
1348 |
<table> |
|
1349 |
<tr> |
|
1350 |
<th align="right" nowrap>| . $locale->text('To') . qq|</th> |
|
1351 |
<td><input name="email" size="30" value="| . |
|
1352 |
Q($form->{"email"}) . qq|"></td> |
|
1353 |
</tr> |
|
1354 |
<tr> |
|
1355 |
<th align="right" nowrap>| . $locale->text('Cc') . qq|</th> |
|
1356 |
<td><input name="cc" size="30" value="| . |
|
1357 |
Q($form->{"cc"}) . qq|"></td> |
|
1358 |
</tr> |
|
1359 |
$bcc |
|
1360 |
<tr> |
|
1361 |
<th align="right" nowrap>| . $locale->text('Subject') . qq|</th> |
|
1362 |
<td><input name="subject" size="30" value="| . |
|
1363 |
Q($form->{"subject"}) . qq|"></td> |
|
1364 |
</tr> |
|
1365 |
<tr> |
|
1366 |
<th align="right" nowrap>| . $locale->text('Attachment name') . |
|
1367 |
qq|</th> |
|
1368 |
<td><input name="attachment_filename" size="30" value="| . |
|
1369 |
Q($attachment_filename) . qq|"></td> |
|
1370 |
</table> |
|
1371 |
</td> |
|
1372 |
</tr> |
|
1373 |
<tr> |
|
1374 |
<td> |
|
1375 |
<table> |
|
1376 |
<tr> |
|
1377 |
<th align="left" nowrap>| . $locale->text('Message') . qq|</th> |
|
1378 |
</tr> |
|
1379 |
<tr> |
|
1380 |
<td><textarea name="message" rows="15" cols="60" wrap="soft">| . |
|
1381 |
H($form->{"message"}) . qq|</textarea></td> |
|
1382 |
</tr> |
|
1383 |
</table> |
|
1384 |
</td> |
|
1385 |
</tr> |
|
1386 |
<tr> |
|
1387 |
<td> |
|
1388 |
|; |
|
1389 |
|
|
1390 |
print_options(); |
|
1391 |
|
|
1392 |
map { delete $form->{$_} } |
|
1393 |
qw(action email cc bcc subject message formname sendmode format header override); |
|
1394 |
|
|
1395 |
# save all other variables |
|
1396 |
foreach $key (keys %$form) { |
|
1397 |
$form->{$key} =~ s/\"/"/g; |
|
1398 |
print qq|<input type="hidden" name="$key" value="| . Q($form->{$key}) . qq|">\n|; |
|
1399 |
} |
|
1400 |
|
|
1401 |
print qq| |
|
1402 |
</td> |
|
1403 |
</tr> |
|
1404 |
<tr> |
|
1405 |
<td><hr size="3" noshade></td> |
|
1406 |
</tr> |
|
1407 |
</table> |
|
1408 |
|
|
1409 |
<input type="hidden" name="nextsub" value="send_email"> |
|
1410 |
|
|
1411 |
<br> |
|
1412 |
<input name="action" class="submit" type="submit" value="| |
|
1413 |
. $locale->text('Continue') . qq|"> |
|
1414 |
</form> |
|
1415 |
|
|
1416 |
</body> |
|
1417 |
</html> |
|
1418 |
|; |
|
1320 |
print $form->parse_html_template('generic/edit_email', |
|
1321 |
{ title => $title, |
|
1322 |
a_filename => $attachment_filename, |
|
1323 |
_print_options_ => print_options('inline'), |
|
1324 |
HIDDEN => [ map +{ name => $_, value => $form->{$_} }, @hidden_keys ], |
|
1325 |
SHOW_BCC => $myconfig{role} eq 'admin' }); |
|
1419 | 1326 |
|
1420 | 1327 |
$lxdebug->leave_sub(); |
1421 | 1328 |
} |
Auch abrufbar als: Unified diff
edit_e_mail auf templates umgestellt