diff --git a/HISTORY.rst b/HISTORY.rst index 534d211af8..e15b41f77d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -162,6 +162,7 @@ * Remove search elapsed time calculation. * Remove SEARCH_LIMIT setting. * Use the 'handler' prefix for all the signal handler functions. +* Remove custom email widget and use Django's. 3.1.11 (2019-04-XX) =================== diff --git a/docs/releases/3.2.rst b/docs/releases/3.2.rst index a456a038f5..99e101f124 100644 --- a/docs/releases/3.2.rst +++ b/docs/releases/3.2.rst @@ -194,6 +194,7 @@ Other changes * Remove search elapsed time calculation. * Remove SEARCH_LIMIT setting. * Use the 'handler' prefix for all the signal handler functions. +* Remove custom email widget and use Django's. Removals -------- diff --git a/mayan/apps/authentication/forms.py b/mayan/apps/authentication/forms.py index c7c0663148..aa4706bd56 100644 --- a/mayan/apps/authentication/forms.py +++ b/mayan/apps/authentication/forms.py @@ -5,10 +5,9 @@ import warnings from django import forms from django.contrib.auth import authenticate from django.contrib.auth.forms import AuthenticationForm +from django.forms.widgets import EmailInput from django.utils.translation import ugettext_lazy as _ -from mayan.apps.common.widgets import EmailInput - class EmailAuthenticationForm(forms.Form): """ diff --git a/mayan/apps/common/widgets.py b/mayan/apps/common/widgets.py index f95552fa4e..38fdd8e8e7 100644 --- a/mayan/apps/common/widgets.py +++ b/mayan/apps/common/widgets.py @@ -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