This commit is contained in:
CocoByte 2024-10-24 00:57:36 -06:00
parent 5250cee1a0
commit 5fc0342426
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F

View file

@ -168,7 +168,7 @@ class NewMemberForm(forms.ModelForm):
member_access_level = forms.ChoiceField(
label="Select permission",
choices=[("admin", "Admin Access"), ("basic", "Basic Access")],
widget=forms.RadioSelect(attrs={'class': 'usa-radio__input usa-radio__input--tile'}),
widget=forms.RadioSelect(attrs={"class": "usa-radio__input usa-radio__input--tile"}),
required=True,
error_messages={
"required": "Member access level is required",
@ -252,10 +252,10 @@ class NewMemberForm(forms.ModelForm):
# Validate the sport based on the selected grade
if permission_level == "True":
#remove the error messages pertaining to basic permission inputs
# remove the error messages pertaining to basic permission inputs
del self.errors["basic_org_domain_request_permissions"]
else:
#remove the error messages pertaining to admin permission inputs
# remove the error messages pertaining to admin permission inputs
del self.errors["admin_org_domain_request_permissions"]
del self.errors["admin_org_members_permissions"]
return cleaned_data