summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorlucasesposito <espositolucas95@gmail.com>2024-07-19 01:26:46 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-08-02 11:31:54 +0200
commitb478cae00643d6730746f2614792b35a7d3187ff (patch)
tree92360f651e77202c741db8640e268b6b660f4f83 /django/forms
parent946c3cf7342cc40c2d8e3d865c96a4ec990f76f4 (diff)
Fixed #35601 -- Added TelInput widget.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/jinja2/django/forms/widgets/tel.html1
-rw-r--r--django/forms/templates/django/forms/widgets/tel.html1
-rw-r--r--django/forms/widgets.py6
3 files changed, 8 insertions, 0 deletions
diff --git a/django/forms/jinja2/django/forms/widgets/tel.html b/django/forms/jinja2/django/forms/widgets/tel.html
new file mode 100644
index 0000000000..08b1e61c0b
--- /dev/null
+++ b/django/forms/jinja2/django/forms/widgets/tel.html
@@ -0,0 +1 @@
+{% include "django/forms/widgets/input.html" %}
diff --git a/django/forms/templates/django/forms/widgets/tel.html b/django/forms/templates/django/forms/widgets/tel.html
new file mode 100644
index 0000000000..08b1e61c0b
--- /dev/null
+++ b/django/forms/templates/django/forms/widgets/tel.html
@@ -0,0 +1 @@
+{% include "django/forms/widgets/input.html" %}
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index f1e233865c..ca5f2724db 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -32,6 +32,7 @@ __all__ = (
"URLInput",
"ColorInput",
"SearchInput",
+ "TelInput",
"PasswordInput",
"HiddenInput",
"MultipleHiddenInput",
@@ -365,6 +366,11 @@ class SearchInput(Input):
template_name = "django/forms/widgets/search.html"
+class TelInput(Input):
+ input_type = "tel"
+ template_name = "django/forms/widgets/tel.html"
+
+
class PasswordInput(Input):
input_type = "password"
template_name = "django/forms/widgets/password.html"