mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Set enabled_langcodes in I18nFormFields in ProviderForm instances
This commit is contained in:
@@ -226,6 +226,8 @@ class ProviderForm(SettingsForm):
|
||||
v._required = v.required
|
||||
v.required = False
|
||||
v.widget.is_required = False
|
||||
if isinstance(v, I18nFormField):
|
||||
v.widget.enabled_langcodes = self.obj.settings.get('locales')
|
||||
|
||||
def clean(self):
|
||||
cleaned_data = super().clean()
|
||||
|
||||
@@ -19,7 +19,6 @@ class BankTransfer(BasePaymentProvider):
|
||||
label=_('Bank account details'),
|
||||
widget=I18nTextarea,
|
||||
)
|
||||
form_field.widget.enabled_langcodes = self.event.settings.get('locales')
|
||||
return OrderedDict(
|
||||
list(super().settings_form_fields.items()) + [('bank_details', form_field)]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user