From b478cae00643d6730746f2614792b35a7d3187ff Mon Sep 17 00:00:00 2001 From: lucasesposito Date: Fri, 19 Jul 2024 01:26:46 +0200 Subject: Fixed #35601 -- Added TelInput widget. --- django/forms/jinja2/django/forms/widgets/tel.html | 1 + django/forms/templates/django/forms/widgets/tel.html | 1 + django/forms/widgets.py | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 django/forms/jinja2/django/forms/widgets/tel.html create mode 100644 django/forms/templates/django/forms/widgets/tel.html (limited to 'django/forms') 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" -- cgit v1.3