Add organization blogs
This commit is contained in:
parent
99fc3d1015
commit
5fff6b1510
27 changed files with 1119 additions and 630 deletions
|
@ -46,7 +46,7 @@ class CustomRegistrationForm(RegistrationForm):
|
|||
)
|
||||
organizations = SortedMultipleChoiceField(
|
||||
queryset=Organization.objects.filter(is_open=True),
|
||||
label=_("Organizations"),
|
||||
label=_("Groups"),
|
||||
required=False,
|
||||
widget=Select2MultipleWidget(attrs={"style": "width:100%"}),
|
||||
)
|
||||
|
@ -65,9 +65,9 @@ class CustomRegistrationForm(RegistrationForm):
|
|||
|
||||
if sum(org.is_open for org in organizations) > max_orgs:
|
||||
raise forms.ValidationError(
|
||||
_(
|
||||
"You may not be part of more than {count} public organizations."
|
||||
).format(count=max_orgs)
|
||||
_("You may not be part of more than {count} public groups.").format(
|
||||
count=max_orgs
|
||||
)
|
||||
)
|
||||
|
||||
return self.cleaned_data["organizations"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue