Edit labels on form fields
This commit is contained in:
@@ -22,6 +22,9 @@ class KaehmyForm_Form(forms.ModelForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(KaehmyForm_Form, self).__init__(*args, **kwargs)
|
||||
|
||||
self.fields["email"].label = _('Email (not public)')
|
||||
self.fields["phone_number"].label = _('Phone number (not public)')
|
||||
|
||||
custom_roles_exist = CustomKaehmyRole.objects.all().exists()
|
||||
self.fields["custom_roles"].widget = forms.widgets.CheckboxSelectMultiple() if custom_roles_exist else forms.HiddenInput()
|
||||
self.fields["custom_roles"].help_text = ""
|
||||
|
||||
Reference in New Issue
Block a user