Make client groups optional
This commit is contained in:
parent
7a1259a565
commit
68c0488462
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
from django.forms import ModelForm, CharField, BooleanField, ImageField, ModelChoiceField, ModelMultipleChoiceField, BooleanField
|
||||
from django.forms import ModelForm, CharField, BooleanField, ImageField, ModelChoiceField, ModelMultipleChoiceField, BooleanField, ValidationError
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.contrib.auth import get_user_model
|
||||
|
@ -45,7 +45,7 @@ class ClientEditForm(ModelForm):
|
|||
company_id = CharField(label=_('Company Registration Number'), required=False)
|
||||
default_currency = ModelChoiceField(Currency.objects.all(), label=_("Default Currency"))
|
||||
brands = ModelMultipleChoiceField(Brand.objects.all(), label=_("Associated Brands"))
|
||||
client_groups = ModelMultipleChoiceField(ClientGroup.objects.all(), label=_("Client Groups"))
|
||||
client_groups = ModelMultipleChoiceField(ClientGroup.objects.all(), label=_("Client Groups"), required=False)
|
||||
marketing_opt_in = BooleanField(label=_("Opted in to marketing messages"), required=False)
|
||||
pgp_key = CharField(label=_("GPG encryption key"), required=False)
|
||||
|
||||
|
@ -66,7 +66,7 @@ class ClientCreateForm(ModelForm):
|
|||
company_id = CharField(label=_('Company Registration Number'), required=False)
|
||||
default_currency = ModelChoiceField(Currency.objects.all(), label=_("Default Currency"))
|
||||
brands = ModelMultipleChoiceField(Brand.objects.all(), label=_("Associated Brands"))
|
||||
client_groups = ModelMultipleChoiceField(ClientGroup.objects.all(), label=_("Client Groups"))
|
||||
client_groups = ModelMultipleChoiceField(ClientGroup.objects.all(), label=_("Client Groups"), required=False)
|
||||
marketing_opt_in = BooleanField(label=_("Opted in to marketing messages"), required=False)
|
||||
pgp_key = CharField(label=_("GPG encryption key"), required=False)
|
||||
send_password = BooleanField(label=_("Send password reset email now?"), required=False)
|
||||
|
|
Loading…
Reference in a new issue