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

@@ -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)
===================

View File

@@ -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
--------

View File

@@ -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):
"""

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