mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Disable switching currency when orders exist (fixes #2047)
This commit is contained in:
@@ -374,6 +374,13 @@ class EventUpdateForm(I18nModelForm):
|
||||
super().__init__(*args, **kwargs)
|
||||
if not self.change_slug:
|
||||
self.fields['slug'].widget.attrs['readonly'] = 'readonly'
|
||||
|
||||
if self.instance.orders.exists():
|
||||
self.fields['currency'].disabled = True
|
||||
self.fields['currency'].help_text = _(
|
||||
'The currency cannot be changed because orders already exist.'
|
||||
)
|
||||
|
||||
self.fields['location'].widget.attrs['rows'] = '3'
|
||||
self.fields['location'].widget.attrs['placeholder'] = _(
|
||||
'Sample Conference Center\nHeidelberg, Germany'
|
||||
|
||||
Reference in New Issue
Block a user