forms: remove cleaning of phone fields
This commit is contained in:
parent
33c60dfd9c
commit
2d1d96c9e2
|
@ -12,19 +12,6 @@ class UserProfileForm(Authentic2UserProfileForm):
|
|||
self.fields['phone'].help_text = None
|
||||
self.fields['mobile'].help_text = None
|
||||
|
||||
def clean_phone_number(self, value):
|
||||
return re.sub('[^0-9]', '', value)
|
||||
|
||||
def clean_mobile(self):
|
||||
data = self.cleaned_data['mobile']
|
||||
data = self.clean_phone_number(data)
|
||||
return data
|
||||
|
||||
def clean_phone(self):
|
||||
data = self.cleaned_data['phone']
|
||||
data = self.clean_phone_number(data)
|
||||
return data
|
||||
|
||||
class Meta(Authentic2UserProfileForm.Meta):
|
||||
widgets = {
|
||||
'phone': forms.TextInput(attrs={'placeholder': _('such as 0499999999')}),
|
||||
|
|
Reference in New Issue