mirror of
https://github.com/django/django.git
synced 2025-08-02 01:53:15 +00:00
Fixed #19686 -- Added HTML5 number input type
Thanks Simon Charette for his help on the patch. Refs #16630.
This commit is contained in:
parent
dcf651c27e
commit
7ec2a21be1
12 changed files with 148 additions and 67 deletions
|
@ -23,7 +23,7 @@ from django.utils import datetime_safe, formats, six
|
|||
|
||||
__all__ = (
|
||||
'Media', 'MediaDefiningClass', 'Widget', 'TextInput',
|
||||
'EmailInput', 'URLInput', 'PasswordInput',
|
||||
'EmailInput', 'URLInput', 'NumberInput', 'PasswordInput',
|
||||
'HiddenInput', 'MultipleHiddenInput', 'ClearableFileInput',
|
||||
'FileInput', 'DateInput', 'DateTimeInput', 'TimeInput', 'Textarea', 'CheckboxInput',
|
||||
'Select', 'NullBooleanSelect', 'SelectMultiple', 'RadioSelect',
|
||||
|
@ -252,6 +252,10 @@ class TextInput(Input):
|
|||
super(TextInput, self).__init__(attrs)
|
||||
|
||||
|
||||
class NumberInput(TextInput):
|
||||
input_type = 'number'
|
||||
|
||||
|
||||
class EmailInput(TextInput):
|
||||
input_type = 'email'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue