mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Translations: Allow to change field order for relative date form field (#4738)
This commit is contained in:
@@ -222,6 +222,12 @@ class RelativeDateTimeWidget(forms.MultiWidget):
|
||||
def get_context(self, name, value, attrs):
|
||||
ctx = super().get_context(name, value, attrs)
|
||||
ctx['required'] = self.status_choices[0][0] == 'unset'
|
||||
|
||||
ctx['rendered_subwidgets'] = [
|
||||
self._render(w['template_name'], {**ctx, 'widget': w})
|
||||
for w in ctx['widget']['subwidgets']
|
||||
]
|
||||
|
||||
return ctx
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user