Skip to content
Snippets Groups Projects
Unverified Commit a2a5c74d authored by gmurtaza00's avatar gmurtaza00 Committed by GitHub
Browse files

Fixed country field type in application form to match state field (#3420)

Fixed country field type in application address field so that it matches
state field visually.

Closes #3419
parent 4907959b
No related branches found
No related tags found
2 merge requests!18Fix application form submit button remaining disabled (#3483),!13Merge in v4.1.1
from django import forms from django import forms
from django_countries import countries from django_countries import countries
from django_select2.forms import Select2Widget
class KeepOwnAttrsWidget(forms.Widget): class KeepOwnAttrsWidget(forms.Widget):
...@@ -9,7 +8,7 @@ class KeepOwnAttrsWidget(forms.Widget): ...@@ -9,7 +8,7 @@ class KeepOwnAttrsWidget(forms.Widget):
return super().get_context(name, value, attrs) return super().get_context(name, value, attrs)
class CountrySelectWithChoices(KeepOwnAttrsWidget, Select2Widget): class CountrySelectWithChoices(KeepOwnAttrsWidget, forms.Select):
is_required = True is_required = True
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment