Remove custom email widget and use Django's
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -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)
|
||||
===================
|
||||
|
||||
@@ -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
|
||||
--------
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user