8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-16 08:23:12 +00:00

Default empty label for PrintAs field is self.user.pseudo

This commit is contained in:
Maxime Bombar 2018-10-20 01:46:46 +02:00 committed by root
parent a01ff3b88f
commit d554cff4ef

View file

@ -28,7 +28,7 @@ class JobWithOptionsForm(FormRevMixin, ModelForm):
self.user = kwargs.pop('user') self.user = kwargs.pop('user')
super(JobWithOptionsForm, self).__init__(*args, prefix=prefix, **kwargs) super(JobWithOptionsForm, self).__init__(*args, prefix=prefix, **kwargs)
self.fields['printAs'].label = 'Print As' self.fields['printAs'].label = 'Print As'
self.fields['printAs'].empty_label = 'Print As' self.fields['printAs'].empty_label = self.user.pseudo
self.fields['printAs'].queryset = self.user.adherent.club_members.all() self.fields['printAs'].queryset = self.user.adherent.club_members.all()
self.fields['disposition'].label = 'disposition' self.fields['disposition'].label = 'disposition'
self.fields['color'].label = 'color' self.fields['color'].label = 'color'