forked from CGM_Public/pretix_original
Add name_for_salutation to customer email placeholders (#2474)
This commit is contained in:
committed by
GitHub
parent
98409b0a22
commit
758179f12f
@@ -182,6 +182,12 @@ class Customer(LoggedModel):
|
|||||||
if f == 'full_name':
|
if f == 'full_name':
|
||||||
continue
|
continue
|
||||||
ctx['name_%s' % f] = get_name_parts_localized(self.name_parts, f)
|
ctx['name_%s' % f] = get_name_parts_localized(self.name_parts, f)
|
||||||
|
|
||||||
|
if "concatenation_for_salutation" in name_scheme:
|
||||||
|
ctx['name_for_salutation'] = name_scheme["concatenation_for_salutation"](self.name_parts)
|
||||||
|
else:
|
||||||
|
ctx['name_for_salutation'] = name_scheme["concatenation"](self.name_parts)
|
||||||
|
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@@ -422,6 +422,7 @@ class MailSettingsForm(SettingsForm):
|
|||||||
if f == 'full_name':
|
if f == 'full_name':
|
||||||
continue
|
continue
|
||||||
placeholders['name_%s' % f] = name_scheme['sample'][f]
|
placeholders['name_%s' % f] = name_scheme['sample'][f]
|
||||||
|
placeholders['name_for_salutation'] = _("Mr Doe")
|
||||||
return placeholders
|
return placeholders
|
||||||
|
|
||||||
def _set_field_placeholders(self, fn, base_parameters):
|
def _set_field_placeholders(self, fn, base_parameters):
|
||||||
|
|||||||
Reference in New Issue
Block a user