forms: remove cleaning of phone fields

This commit is contained in:
Benjamin Dauvergne 2013-07-29 15:27:26 +02:00
parent 33c60dfd9c
commit 2d1d96c9e2
1 changed files with 0 additions and 13 deletions

View File

@ -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')}),