summaryrefslogtreecommitdiff
path: root/django/forms/widgets.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-01-28 14:12:56 +0100
committerClaude Paroz <claude@2xlibre.net>2013-01-28 22:10:50 +0100
commit4f16376274a4e52074722c615fccef5fac5f009a (patch)
tree06758241da714e07d2cda1a97c7c6f12720e352a /django/forms/widgets.py
parentc47fa3b4814240bb47342a4446d40ea83bd3ed19 (diff)
Added HTML5 email input type
Refs #16630.
Diffstat (limited to 'django/forms/widgets.py')
-rw-r--r--django/forms/widgets.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 303844d44b..f201e914dd 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -22,7 +22,7 @@ from django.utils.safestring import mark_safe
from django.utils import datetime_safe, formats, six
__all__ = (
- 'Media', 'MediaDefiningClass', 'Widget', 'TextInput', 'PasswordInput',
+ 'Media', 'MediaDefiningClass', 'Widget', 'TextInput', 'EmailInput', 'PasswordInput',
'HiddenInput', 'MultipleHiddenInput', 'ClearableFileInput',
'FileInput', 'DateInput', 'DateTimeInput', 'TimeInput', 'Textarea', 'CheckboxInput',
'Select', 'NullBooleanSelect', 'SelectMultiple', 'RadioSelect',
@@ -251,6 +251,10 @@ class TextInput(Input):
super(TextInput, self).__init__(attrs)
+class EmailInput(TextInput):
+ input_type = 'email'
+
+
class PasswordInput(TextInput):
input_type = 'password'