diff --git a/saas/forms.py b/saas/forms.py index 3c80c3ab..d12cd0dd 100644 --- a/saas/forms.py +++ b/saas/forms.py @@ -215,8 +215,8 @@ def __init__(self, *args, **kwargs): self.fields['is_bulk_buyer'] = forms.BooleanField(required=False, initial=initial, label=mark_safe(_("Enable GroupBuy (what is it?)" - ))) +"https://www.djaodjin.com/docs/faq/#group-billing\" target=\"_blank\">"\ +"what is it?)"))) if 'is_provider' in self.initial: initial = self.initial['is_provider'] if self.instance: diff --git a/saas/models.py b/saas/models.py index b55f4eeb..4ee0ee2a 100644 --- a/saas/models.py +++ b/saas/models.py @@ -284,7 +284,7 @@ class AbstractOrganization(models.Model): is_bulk_buyer = models.BooleanField(default=False, help_text=mark_safe(_("Enable GroupBuy ("\ - "what is it?)"))) is_provider = models.BooleanField(default=False, help_text=_("The profile can fulfill the provider side"\ diff --git a/saas/settings.py b/saas/settings.py index 1339dda6..a8e89369 100644 --- a/saas/settings.py +++ b/saas/settings.py @@ -99,7 +99,7 @@ 'CSV_CUSTOMER_CONTACTS_INCLUDED': True, 'DEFAULT_UNIT': 'usd', 'DISABLE_UPDATES': False, - 'DISPLAY_BULK_BUYER_TOGGLE': False, + 'DISPLAY_BULK_BUYER_TOGGLE': True, 'EXPIRE_NOTICE_DAYS': [15], 'EXTRA_MIXIN': object, 'EXTRA_FIELD': None, diff --git a/saas/views/profile.py b/saas/views/profile.py index 9eda24c2..0a144edf 100644 --- a/saas/views/profile.py +++ b/saas/views/profile.py @@ -452,10 +452,12 @@ def get_form_class(self): def get_initial(self): kwargs = super(OrganizationProfileView, self).get_initial() - if Plan.objects.exists() and settings.DISPLAY_BULK_BUYER_TOGGLE: - # Do not display the bulk buying option if there are no plans. - kwargs.update({'is_bulk_buyer': self.object.is_bulk_buyer}) if _valid_manager(self.request, [get_broker()]): + # Shows checkbox for `is_bulk_buyer` and `is_provider` only + # to brokers. + if Plan.objects.exists() and settings.DISPLAY_BULK_BUYER_TOGGLE: + # Do not display the bulk buying option if there are no plans. + kwargs.update({'is_bulk_buyer': self.object.is_bulk_buyer}) kwargs.update({ 'is_provider': self.object.is_provider, 'extra': self.object.extra})