mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Added Person-Name-Scheme for showing/entering academic degree after the name (e.g. <Name>, MA) (#1861)
This commit is contained in:
committed by
GitHub
parent
66af5973ec
commit
c71c78cf69
@@ -2052,6 +2052,30 @@ PERSON_NAME_SCHEMES = OrderedDict([
|
|||||||
'_scheme': 'salutation_title_given_family',
|
'_scheme': 'salutation_title_given_family',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
('salutation_title_given_family_degree', {
|
||||||
|
'fields': (
|
||||||
|
('salutation', pgettext_lazy('person_name', 'Salutation'), 1),
|
||||||
|
('title', pgettext_lazy('person_name', 'Title'), 1),
|
||||||
|
('given_name', _('Given name'), 2),
|
||||||
|
('family_name', _('Family name'), 2),
|
||||||
|
('degree', pgettext_lazy('person_name', 'Degree (after name)'), 2),
|
||||||
|
),
|
||||||
|
'concatenation': lambda d: (
|
||||||
|
' '.join(
|
||||||
|
str(p) for p in (d.get(key, '') for key in ["title", "given_name", "family_name"]) if p
|
||||||
|
) +
|
||||||
|
str((', ' if d.get('degree') else '')) +
|
||||||
|
str(d.get('degree', ''))
|
||||||
|
),
|
||||||
|
'sample': {
|
||||||
|
'salutation': pgettext_lazy('person_name_sample', 'Mr'),
|
||||||
|
'title': pgettext_lazy('person_name_sample', 'Dr'),
|
||||||
|
'given_name': pgettext_lazy('person_name_sample', 'John'),
|
||||||
|
'family_name': pgettext_lazy('person_name_sample', 'Doe'),
|
||||||
|
'degree': pgettext_lazy('person_name_sample', 'MA'),
|
||||||
|
'_scheme': 'salutation_title_given_family_degree',
|
||||||
|
},
|
||||||
|
}),
|
||||||
])
|
])
|
||||||
COUNTRIES_WITH_STATE_IN_ADDRESS = {
|
COUNTRIES_WITH_STATE_IN_ADDRESS = {
|
||||||
# Source: http://www.bitboost.com/ref/international-address-formats.html
|
# Source: http://www.bitboost.com/ref/international-address-formats.html
|
||||||
|
|||||||
@@ -512,7 +512,7 @@ table td > .checkbox input[type="checkbox"] {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
input, select {
|
input, select {
|
||||||
width: auto;
|
min-width: 5em;
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ a.btn, button.btn {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
input, select {
|
input, select {
|
||||||
width: auto;
|
min-width: 5em;
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user