Remove custom email widget and use Django's

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-27 01:47:55 -04:00
parent 6e91ebe5f4
commit dd81d8e237
4 changed files with 3 additions and 25 deletions

View File

@@ -20,29 +20,6 @@ class DisableableSelectWidget(forms.widgets.SelectMultiple):
return result
# From: http://www.peterbe.com/plog/emailinput-html5-django
class EmailInput(forms.widgets.Input):
"""
Class for a login form widget that accepts only well formated
email address
"""
input_type = 'email'
def render(self, name, value, attrs=None):
if attrs is None:
attrs = {}
attrs.update(
{
'autocorrect': 'off',
'autocapitalize': 'off',
'spellcheck': 'false'
}
)
return super(EmailInput, self).render(name, value, attrs=attrs)
class PlainWidget(forms.widgets.Widget):
"""
Class to define a form widget that effectively nulls the htmls of a