Revision e09347c8
Von Geoffrey Richardson vor mehr als 15 Jahren hinzugefügt
SL/CT.pm | ||
---|---|---|
194 | 194 |
|
195 | 195 |
my $dbh = $form->dbconnect($myconfig); |
196 | 196 |
|
197 |
$query = |
|
198 |
qq|SELECT DISTINCT(cp_greeting) | . |
|
199 |
qq|FROM contacts | . |
|
200 |
qq|WHERE cp_greeting ~ '[a-zA-Z]' | . |
|
201 |
qq|ORDER BY cp_greeting|; |
|
202 |
$form->{GREETINGS} = [ selectall_array_query($form, $dbh, $query) ]; |
|
203 |
|
|
204 |
$query = |
|
205 |
qq|SELECT DISTINCT(greeting) | . |
|
206 |
qq|FROM customer | . |
|
207 |
qq|WHERE greeting ~ '[a-zA-Z]' | . |
|
208 |
qq|UNION | . |
|
209 |
qq|SELECT DISTINCT(greeting) | . |
|
210 |
qq|FROM vendor | . |
|
211 |
qq|WHERE greeting ~ '[a-zA-Z]' | . |
|
212 |
qq|ORDER BY greeting|; |
|
213 |
my %tmp; |
|
214 |
map({ $tmp{$_} = 1; } selectall_array_query($form, $dbh, $query)); |
|
215 |
$form->{COMPANY_GREETINGS} = [ sort(keys(%tmp)) ]; |
|
197 |
# edit: cp_greeting wurde entfernt, wird durch cp_gender ersetzt |
|
198 |
# $query = |
|
199 |
# qq|SELECT DISTINCT(cp_greeting) | . |
|
200 |
# qq|FROM contacts | . |
|
201 |
# qq|WHERE cp_greeting ~ '[a-zA-Z]' | . |
|
202 |
# qq|ORDER BY cp_greeting|; |
|
203 |
# $form->{GREETINGS} = [ selectall_array_query($form, $dbh, $query) ]; |
|
204 |
# |
|
205 |
# $query = |
|
206 |
# qq|SELECT DISTINCT(greeting) | . |
|
207 |
# qq|FROM customer | . |
|
208 |
# qq|WHERE greeting ~ '[a-zA-Z]' | . |
|
209 |
# qq|UNION | . |
|
210 |
# qq|SELECT DISTINCT(greeting) | . |
|
211 |
# qq|FROM vendor | . |
|
212 |
# qq|WHERE greeting ~ '[a-zA-Z]' | . |
|
213 |
# qq|ORDER BY greeting|; |
|
214 |
# my %tmp; |
|
215 |
# map({ $tmp{$_} = 1; } selectall_array_query($form, $dbh, $query)); |
|
216 |
# $form->{COMPANY_GREETINGS} = [ sort(keys(%tmp)) ]; |
|
216 | 217 |
|
217 | 218 |
$query = |
218 | 219 |
qq|SELECT DISTINCT(cp_title) | . |
... | ... | |
392 | 393 |
qq|cp_project = ?, | . |
393 | 394 |
qq|cp_privatphone = ?, | . |
394 | 395 |
qq|cp_privatemail = ?, | . |
395 |
qq|cp_birthday = ? | . |
|
396 |
qq|cp_birthday = ?, | . |
|
397 |
qq|cp_gender = ? | . |
|
396 | 398 |
qq|WHERE cp_id = ?|; |
397 | 399 |
@values = ( |
398 | 400 |
$form->{cp_greeting}, |
... | ... | |
412 | 414 |
$form->{cp_privatphone}, |
413 | 415 |
$form->{cp_privatemail}, |
414 | 416 |
$form->{cp_birthday}, |
417 |
$form->{cp_gender} eq 'f' ? 'f' : 'm', |
|
415 | 418 |
$form->{cp_id} |
416 | 419 |
); |
417 | 420 |
} elsif ( $form->{cp_name} || $form->{cp_givenname} ) { |
... | ... | |
419 | 422 |
qq|INSERT INTO contacts ( cp_cv_id, cp_greeting, cp_title, cp_givenname, | . |
420 | 423 |
qq| cp_name, cp_email, cp_phone1, cp_phone2, cp_abteilung, cp_fax, cp_mobile1, | . |
421 | 424 |
qq| cp_mobile2, cp_satphone, cp_satfax, cp_project, cp_privatphone, cp_privatemail, | . |
422 |
qq| cp_birthday) | . |
|
423 |
qq|VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; |
|
425 |
qq| cp_birthday, cp_gender) | .
|
|
426 |
qq|VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
|
|
424 | 427 |
@values = ( |
425 | 428 |
$form->{id}, |
426 | 429 |
$form->{cp_greeting}, |
... | ... | |
439 | 442 |
$form->{cp_project}, |
440 | 443 |
$form->{cp_privatphone}, |
441 | 444 |
$form->{cp_privatemail}, |
442 |
$form->{cp_birthday} |
|
445 |
$form->{cp_birthday}, |
|
446 |
$form->{cp_gender} eq 'f' ? 'f' : 'm', |
|
443 | 447 |
); |
444 | 448 |
} |
445 | 449 |
do_query( $form, $dbh, $query, @values ) if ($query); |
... | ... | |
598 | 602 |
qq|cp_privatphone = ?, | . |
599 | 603 |
qq|cp_privatemail = ?, | . |
600 | 604 |
qq|cp_birthday = ? | . |
605 |
qq|cp_gender = ? | . |
|
601 | 606 |
qq|WHERE cp_id = ?|; |
602 | 607 |
@values = ( |
603 | 608 |
$form->{cp_greeting}, |
... | ... | |
617 | 622 |
$form->{cp_privatphone}, |
618 | 623 |
$form->{cp_privatemail}, |
619 | 624 |
$form->{cp_birthday}, |
625 |
$form->{cp_gender} eq 'f' ? 'f' : 'm', |
|
620 | 626 |
$form->{cp_id} |
621 | 627 |
); |
622 | 628 |
} elsif ( $form->{cp_name} || $form->{cp_givenname} ) { |
... | ... | |
624 | 630 |
qq|INSERT INTO contacts ( cp_cv_id, cp_greeting, cp_title, cp_givenname, | . |
625 | 631 |
qq| cp_name, cp_email, cp_phone1, cp_phone2, cp_abteilung, cp_fax, cp_mobile1, | . |
626 | 632 |
qq| cp_mobile2, cp_satphone, cp_satfax, cp_project, cp_privatphone, cp_privatemail, | . |
627 |
qq| cp_birthday) | . |
|
628 |
qq|VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; |
|
633 |
qq| cp_birthday, cp_gender) | .
|
|
634 |
qq|VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|;
|
|
629 | 635 |
@values = ( |
630 | 636 |
$form->{id}, |
631 | 637 |
$form->{cp_greeting}, |
SL/Common.pm | ||
---|---|---|
194 | 194 |
push(@queries, qq|SELECT |
195 | 195 |
c.id, c.name, 0 AS customer_is_vendor, |
196 | 196 |
c.street, c.zipcode, c.city, |
197 |
ct.cp_greeting, ct.cp_title, ct.cp_givenname, ct.cp_name
|
|
197 |
ct.cp_gender, ct.cp_title, ct.cp_givenname, ct.cp_name
|
|
198 | 198 |
FROM customer c |
199 | 199 |
LEFT JOIN contacts ct ON (c.id = ct.cp_cv_id) |
200 | 200 |
$c_filter|); |
... | ... | |
207 | 207 |
push(@queries, qq|SELECT |
208 | 208 |
v.id, v.name, 1 AS customer_is_vendor, |
209 | 209 |
v.street, v.zipcode, v.city, |
210 |
ct.cp_greeting, ct.cp_title, ct.cp_givenname, ct.cp_name
|
|
210 |
ct.cp_gender, ct.cp_title, ct.cp_givenname, ct.cp_name
|
|
211 | 211 |
FROM vendor v |
212 | 212 |
LEFT JOIN contacts ct ON (v.id = ct.cp_cv_id) |
213 | 213 |
$v_filter|); |
SL/Form.pm | ||
---|---|---|
1355 | 1355 |
|
1356 | 1356 |
while (<IN>) { |
1357 | 1357 |
print OUT $_; |
1358 |
open(DUMP_OUT, "> /tmp/lx2.dump" ); |
|
1359 |
print(DUMP_OUT Dumper($self)); |
|
1360 |
close(DUMP_OUT); |
|
1361 |
|
|
1358 | 1362 |
} |
1359 | 1363 |
|
1360 | 1364 |
close(OUT); |
SL/IR.pm | ||
---|---|---|
39 | 39 |
use SL::Common; |
40 | 40 |
use SL::DBUtils; |
41 | 41 |
use SL::DO; |
42 |
use SL::GenericTranslations; |
|
42 | 43 |
use SL::MoreCommon; |
43 | 44 |
use List::Util qw(min); |
44 | 45 |
|
... | ... | |
1147 | 1148 |
'trans_id' => $form->{vendor_id}); |
1148 | 1149 |
map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables }; |
1149 | 1150 |
|
1151 |
$form->{cp_greeting} = GenericTranslations->get('dbh' => $dbh, |
|
1152 |
'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), |
|
1153 |
'allow_fallback' => 1); |
|
1154 |
|
|
1150 | 1155 |
$dbh->disconnect(); |
1151 | 1156 |
|
1152 | 1157 |
$main::lxdebug->leave_sub(); |
SL/IS.pm | ||
---|---|---|
44 | 44 |
use SL::Common; |
45 | 45 |
use SL::DBUtils; |
46 | 46 |
use SL::DO; |
47 |
use SL::GenericTranslations; |
|
47 | 48 |
use SL::MoreCommon; |
48 | 49 |
use SL::IC; |
49 | 50 |
use Data::Dumper; |
... | ... | |
423 | 424 |
# connect to database |
424 | 425 |
my $dbh = $form->dbconnect($myconfig); |
425 | 426 |
|
427 |
my $language_id = $form->{language_id}; |
|
428 |
|
|
426 | 429 |
# get contact id, set it if nessessary |
427 | 430 |
$form->{cp_id} *= 1; |
428 | 431 |
|
... | ... | |
484 | 487 |
'trans_id' => $form->{customer_id}); |
485 | 488 |
map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables }; |
486 | 489 |
|
490 |
$form->{cp_greeting} = GenericTranslations->get('dbh' => $dbh, |
|
491 |
'translation_type' => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'), |
|
492 |
'language_id' => $language_id, |
|
493 |
'allow_fallback' => 1); |
|
494 |
|
|
495 |
|
|
487 | 496 |
$dbh->disconnect; |
488 | 497 |
|
489 | 498 |
$main::lxdebug->leave_sub(); |
bin/mozilla/common.pl | ||
---|---|---|
572 | 572 |
$cov->{address} =~ s{^,}{}x; |
573 | 573 |
$cov->{address} =~ s{\ +}{\ }gx; |
574 | 574 |
|
575 |
$cov->{contact} = join " ", map { $cov->{$_} } qw(cp_greeting cp_title cp_givenname cp_name);
|
|
575 |
$cov->{contact} = join " ", map { $cov->{$_} } qw(cp_gender cp_title cp_givenname cp_name);
|
|
576 | 576 |
$cov->{contact} =~ s{\ +}{\ }gx; |
577 | 577 |
} |
578 | 578 |
|
bin/mozilla/ct.pl | ||
---|---|---|
576 | 576 |
|
577 | 577 |
CT->get_contact(\%myconfig, \%$form); |
578 | 578 |
print $form->ajax_response_header(), join '__pjx__', map $form->{"cp_$_"}, |
579 |
qw(name greeting title givenname phone1 phone2 email abteilung fax mobile1 mobile2 satphone satfax project privatphone privatemail birthday used); |
|
579 |
qw(name greeting title givenname phone1 phone2 email abteilung fax mobile1 mobile2 satphone satfax project privatphone privatemail birthday used gender);
|
|
580 | 580 |
$lxdebug->leave_sub(); |
581 | 581 |
|
582 | 582 |
} |
locale/de/all | ||
---|---|---|
479 | 479 |
'December' => 'Dezember', |
480 | 480 |
'Decimalplaces' => 'Dezimalstellen', |
481 | 481 |
'Decrease' => 'Verringern', |
482 |
'Default (no language selected)' => 'Standard (keine Sprache ausgewählt)', |
|
482 | 483 |
'Default Accounts' => 'Standardkonten', |
483 | 484 |
'Default output medium' => 'Standardausgabekanal', |
484 | 485 |
'Default printer' => 'Standarddrucker', |
... | ... | |
624 | 625 |
'Edit and delete a group' => 'Gruppen bearbeiten und löschen', |
625 | 626 |
'Edit custom variable' => 'Benutzerdefinierte Variable bearbeiten', |
626 | 627 |
'Edit file' => 'Datei bearbeiten', |
628 |
'Edit greetings' => 'Anreden bearbeiten', |
|
627 | 629 |
'Edit group ' => 'Gruppe bearbeiten', |
628 | 630 |
'Edit group membership' => 'Gruppenmitgliedschaften bearbeiten', |
629 | 631 |
'Edit groups' => 'Gruppen bearbeiten', |
... | ... | |
723 | 725 |
'Full access to all functions' => 'Vollzugriff auf alle Funktionen', |
724 | 726 |
'GL Transaction' => 'Dialogbuchung', |
725 | 727 |
'Gegenkonto' => 'Gegenkonto', |
728 |
'Gender' => 'Geschlecht', |
|
726 | 729 |
'General Ledger' => 'Finanzbuchhaltung', |
727 | 730 |
'General Ledger Corrections' => 'Korrekturen im Hauptbuch', |
728 | 731 |
'General Ledger Transaction' => 'Dialogbuchung', |
... | ... | |
732 | 735 |
'German' => 'Deutsch', |
733 | 736 |
'Given Name' => 'Vorname', |
734 | 737 |
'Greeting' => 'Anrede', |
738 |
'Greetings' => 'Anreden', |
|
735 | 739 |
'Group' => 'Warengruppe', |
736 | 740 |
'Group Invoices' => 'Rechnungen zusammenfassen', |
737 | 741 |
'Group Items' => 'Waren gruppieren', |
... | ... | |
1506 | 1510 |
'The following users have been migrated into the authentication database:' => 'Die folgenden Benutzer wurden in die Authentifizierungsdatenbank migriert:', |
1507 | 1511 |
'The following warnings occured during an upgrade to the document templates:' => 'Die folgenden Warnungen traten während einer Aktualisierung der Dokumentenvorlagen auf:', |
1508 | 1512 |
'The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>' => 'Die Formeln müssen in der folgenden Syntax eingegeben werden:<br>Bei normalen Artikeln:<br>Variablenname = Variable Einheit;<br>Variablenname2 = Variable2 Einheit2;<br>...<br>###<br>Variable + Variable2 * ( Variable - Variable2 )<br>Variablennamen und Einheiten d?rfen nur aus alphanumerischen Zeichen bestehen.<br>Es muss jeweils die Gesamte Zeile eingegeben werden', |
1513 |
'The greetings have been saved.' => 'Die Anreden wurden gespeichert', |
|
1509 | 1514 |
'The group has been added.' => 'Die Gruppe wurde erfasst.', |
1510 | 1515 |
'The group has been deleted.' => 'Die Gruppe wurde gelöscht.', |
1511 | 1516 |
'The group has been saved.' => 'Die Gruppe wurde gespeichert.', |
... | ... | |
1815 | 1820 |
'eMail?' => 'eMail?', |
1816 | 1821 |
'ea' => 'St.', |
1817 | 1822 |
'emailed to' => 'gemailt an', |
1823 |
'female' => 'weiblich', |
|
1818 | 1824 |
'follow_up_list' => 'wiedervorlageliste', |
1819 | 1825 |
'for' => 'für', |
1820 | 1826 |
'for Period' => 'f?r den Zeitraum', |
... | ... | |
1832 | 1838 |
'list_of_receipts' => 'zahlungseingaenge', |
1833 | 1839 |
'list_of_transactions' => 'buchungsliste', |
1834 | 1840 |
'logout' => 'abmelden', |
1841 |
'male' => 'männlich', |
|
1835 | 1842 |
'mark as paid' => 'als bezahlt markieren', |
1836 | 1843 |
'master' => 'de', |
1837 | 1844 |
'missing' => 'Fehlbestand', |
locale/de/menu | ||
---|---|---|
106 | 106 |
'General Ledger' => 'Finanzbuchhaltung', |
107 | 107 |
'General Ledger Corrections' => 'Korrekturen im Hauptbuch', |
108 | 108 |
'General ledger and cash' => 'Finanzbuchhaltung und Zahlungsverkehr', |
109 |
'Greetings' => 'Anreden', |
|
109 | 110 |
'Groups' => 'Warengruppen', |
110 | 111 |
'HTML Templates' => 'HTML-Vorlagen', |
111 | 112 |
'History Search Engine' => 'Historien Suchmaschine', |
locale/de/menunew | ||
---|---|---|
105 | 105 |
'General Ledger' => 'Finanzbuchhaltung', |
106 | 106 |
'General Ledger Corrections' => 'Korrekturen im Hauptbuch', |
107 | 107 |
'General ledger and cash' => 'Finanzbuchhaltung und Zahlungsverkehr', |
108 |
'Greetings' => 'Anreden', |
|
108 | 109 |
'Groups' => 'Warengruppen', |
109 | 110 |
'HTML Templates' => 'HTML-Vorlagen', |
110 | 111 |
'History Search Engine' => 'Historien Suchmaschine', |
menu.ini | ||
---|---|---|
642 | 642 |
module=am.pl |
643 | 643 |
action=list_language |
644 | 644 |
|
645 |
[System--Languages--Greetings] |
|
646 |
module=generictranslations.pl |
|
647 |
action=edit_greetings |
|
648 |
|
|
649 |
|
|
645 | 650 |
[System--Printer] |
646 | 651 |
module=menu.pl |
647 | 652 |
action=acc_menu |
sql/Pg-upgrade2/gender.sql | ||
---|---|---|
1 |
-- @tag: gender |
|
2 |
-- @description: Feld "Geschlecht" zu Kontaktdaten hinzufuegen, cp_greeting entferne |
|
3 |
-- @depends: release_2_6_0 |
|
4 |
|
|
5 |
ALTER TABLE contacts ADD COLUMN cp_gender char(1); |
|
6 |
UPDATE contacts SET cp_gender = 'm'; |
|
7 |
UPDATE contacts SET cp_gender = 'f' |
|
8 |
WHERE (cp_greeting ILIKE '%frau%') |
|
9 |
OR (cp_greeting ILIKE '%mrs.%') |
|
10 |
OR (cp_greeting ILIKE '%miss%'); |
|
11 |
|
|
12 |
UPDATE contacts SET cp_title = cp_greeting WHERE NOT (cp_greeting ILIKE '%frau%' OR cp_greeting ILIKE '%herr%' or cp_greeting ILIKE '%mrs.%' or cp_greeting ILIKE '%miss%'); |
|
13 |
|
|
14 |
ALtER TABLE contacts DROP COLUMN cp_greeting; |
sql/Pg-upgrade2/generic_translations.sql | ||
---|---|---|
1 |
-- @tag: generic_translations |
|
2 |
-- @description: Allgemeine Tabelle fuer Uebersetzungen |
|
3 |
-- @depends: release_2_6_0 |
|
4 |
CREATE TABLE generic_translations ( |
|
5 |
id SERIAL, |
|
6 |
language_id integer, |
|
7 |
translation_type varchar(100) NOT NULL, |
|
8 |
translation_id integer, |
|
9 |
translation text, |
|
10 |
|
|
11 |
PRIMARY KEY (id), |
|
12 |
FOREIGN KEY (language_id) REFERENCES language (id) |
|
13 |
); |
|
14 |
CREATE INDEX generic_translations_type_id_idx ON generic_translations (language_id, translation_type, translation_id); |
|
15 |
|
templates/webpages/ct/form_header_de.html | ||
---|---|---|
245 | 245 |
name = 'shipto_id', |
246 | 246 |
id = 'shipto_id', |
247 | 247 |
DATA = SHIPTO, |
248 |
onChange = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto])", |
|
248 |
onChange = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto,set_gender])",
|
|
249 | 249 |
id_key = 'shipto_id', |
250 | 250 |
label_sub = 'shipto_label', |
251 | 251 |
label_key = 'shipto_label', |
... | ... | |
326 | 326 |
name = 'cp_id', |
327 | 327 |
id = 'cp_id', |
328 | 328 |
DATA = CONTACTS, |
329 |
onChange = "get_contact(['cp_id__'+this.value],['cp_name','cp_greeting','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2','cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact])",
|
|
329 |
onChange = "get_contact(['cp_id__'+this.value],['cp_name','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2','cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact,set_gender])",
|
|
330 | 330 |
id_key = 'cp_id', |
331 | 331 |
label_sub = 'contacts_label', |
332 | 332 |
-%] |
333 | 333 |
</td> |
334 | 334 |
</tr> |
335 | 335 |
|
336 |
<tr> |
|
337 |
<th align="left" nowrap>Anrede</th> |
|
338 |
<td> |
|
339 |
<input id="cp_greeting" name="cp_greeting" size="40" maxlength="75" value="[% HTML.escape(cp_greeting) %]"> |
|
340 |
[%- INCLUDE generic/multibox.html |
|
341 |
name = 'selected_cp_greeting', |
|
342 |
DATA = MB_GREETINGS, |
|
343 |
show_empty = 1, |
|
344 |
id_key = 'id', |
|
345 |
label_key = 'description', |
|
346 |
-%] |
|
347 |
</td> |
|
348 |
</tr> |
|
336 |
<tr> |
|
337 |
<th align="left" nowrap>Geschlecht</th> |
|
338 |
<td> |
|
339 |
<select id="cp_gender" name="cp_gender"> |
|
340 |
<option value="m"[% IF cp_gender == 'm' %] selected[% END %]>männlich</option> |
|
341 |
<option value="f"[% IF cp_gender == 'f' %] selected[% END %]>weiblich</option> |
|
342 |
</select> |
|
343 |
</td> |
|
344 |
</tr> |
|
345 |
<tr> |
|
349 | 346 |
|
350 | 347 |
<tr> |
351 | 348 |
<th align="left" nowrap>Titel</th> |
... | ... | |
598 | 595 |
[%- END %] |
599 | 596 |
|
600 | 597 |
</div> |
598 |
|
|
599 |
<script type="text/javascript"> |
|
600 |
<!-- |
|
601 |
function set_gender(gender) { |
|
602 |
var s = document.getElementById('cp_gender'); |
|
603 |
if (s) { |
|
604 |
s.selectedIndex = (gender == 'f') ? 1 : 0; |
|
605 |
} |
|
606 |
} |
|
607 |
--> |
|
608 |
|
|
609 |
</script> |
|
610 |
|
|
611 |
|
|
612 |
|
templates/webpages/ct/form_header_master.html | ||
---|---|---|
245 | 245 |
name = 'shipto_id', |
246 | 246 |
id = 'shipto_id', |
247 | 247 |
DATA = SHIPTO, |
248 |
onChange = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto])", |
|
248 |
onChange = "get_shipto(['shipto_id__' + this.value], ['shiptoname','shiptodepartment_1', 'shiptodepartment_2','shiptostreet','shiptozipcode','shiptocity','shiptocountry','shiptocontact','shiptophone','shiptofax','shiptoemail',enable_delete_shipto,set_gender])",
|
|
249 | 249 |
id_key = 'shipto_id', |
250 | 250 |
label_sub = 'shipto_label', |
251 | 251 |
label_key = 'shipto_label', |
... | ... | |
326 | 326 |
name = 'cp_id', |
327 | 327 |
id = 'cp_id', |
328 | 328 |
DATA = CONTACTS, |
329 |
onChange = "get_contact(['cp_id__'+this.value],['cp_name','cp_greeting','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2','cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact])",
|
|
329 |
onChange = "get_contact(['cp_id__'+this.value],['cp_name','cp_title','cp_givenname','cp_phone1','cp_phone2','cp_email','cp_abteilung','cp_fax','cp_mobile1','cp_mobile2','cp_satphone','cp_satfax','cp_project','cp_privatphone','cp_privatemail','cp_birthday',enable_delete_contact,set_gender])",
|
|
330 | 330 |
id_key = 'cp_id', |
331 | 331 |
label_sub = 'contacts_label', |
332 | 332 |
-%] |
333 | 333 |
</td> |
334 | 334 |
</tr> |
335 | 335 |
|
336 |
<tr> |
|
337 |
<th align="left" nowrap><translate>Greeting</translate></th> |
|
338 |
<td> |
|
339 |
<input id="cp_greeting" name="cp_greeting" size="40" maxlength="75" value="[% HTML.escape(cp_greeting) %]"> |
|
340 |
[%- INCLUDE generic/multibox.html |
|
341 |
name = 'selected_cp_greeting', |
|
342 |
DATA = MB_GREETINGS, |
|
343 |
show_empty = 1, |
|
344 |
id_key = 'id', |
|
345 |
label_key = 'description', |
|
346 |
-%] |
|
347 |
</td> |
|
348 |
</tr> |
|
336 |
<tr> |
|
337 |
<th align="left" nowrap><translate>Gender</translate></th> |
|
338 |
<td> |
|
339 |
<select id="cp_gender" name="cp_gender"> |
|
340 |
<option value="m"[% IF cp_gender == 'm' %] selected[% END %]><translate>male</translate></option> |
|
341 |
<option value="f"[% IF cp_gender == 'f' %] selected[% END %]><translate>female</translate></option> |
|
342 |
</select> |
|
343 |
</td> |
|
344 |
</tr> |
|
345 |
<tr> |
|
349 | 346 |
|
350 | 347 |
<tr> |
351 | 348 |
<th align="left" nowrap><translate>Title</translate></th> |
... | ... | |
598 | 595 |
[%- END %] |
599 | 596 |
|
600 | 597 |
</div> |
598 |
|
|
599 |
<script type="text/javascript"> |
|
600 |
<!-- |
|
601 |
function set_gender(gender) { |
|
602 |
var s = document.getElementById('cp_gender'); |
|
603 |
if (s) { |
|
604 |
s.selectedIndex = (gender == 'f') ? 1 : 0; |
|
605 |
} |
|
606 |
} |
|
607 |
--> |
|
608 |
|
|
609 |
</script> |
|
610 |
|
|
611 |
|
|
612 |
|
Auch abrufbar als: Unified diff
Ansprechpartner: cp_greeting durch cp_gender ersetzt
contacts->cp_greeting, was normalerweise fuer Frau/Herr benutzt wird,
wird durch cp_gender (m/f) ersetzt, was den Vorteil hat, dass man je
nach beim Kunden definierter Sprache verschiedene Anreden generieren und
die Anreden zentral verwalten kann.
1. cp_gender wird fuer alle Ansprechpartner auf "m" gesetzt
2. cp_gender wird fuer die Ansprechpartner auf "f" gesetzt, bei denen in
cp_greeting Frau/Mrs/Miss vorkam, bei abweichender weiblicher Deklaration muss
hier also noch nachgepflegt werden
3. alle cp_greeting-Eintraege, die nicht Herr/Frau/Mrs/Miss enthalten
werden nach cp_title verschoben
4. cp_greeting wird geloescht