mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-06 03:03:25 +02:00
cleaned up code as well as comments
This commit is contained in:
parent
aeef0b76e1
commit
fef606c1dc
6 changed files with 22 additions and 22 deletions
|
@ -27,6 +27,8 @@ class UserProfileForm(forms.ModelForm):
|
|||
required = ["first_name", "last_name", "title", "email", "phone"]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Override the inerited __init__ method to update the fields."""
|
||||
|
||||
super().__init__(*args, **kwargs)
|
||||
# take off maxlength attribute for the phone number field
|
||||
# which interferes with out input_with_errors template tag
|
||||
|
@ -51,8 +53,8 @@ class UserProfileForm(forms.ModelForm):
|
|||
self.fields["email"].error_messages = {
|
||||
"required": "Enter your email address in the required format, like name@example.com."
|
||||
}
|
||||
# self.fields["email"].widget.attrs["readonly"] = "readonly"
|
||||
self.fields["phone"].error_messages["required"] = "Enter your phone number."
|
||||
self.domainInfo = None
|
||||
|
||||
DomainHelper.disable_field(self.fields["email"], disable_required=True)
|
||||
DomainHelper.disable_field(self.fields["email"], disable_required=True)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue