Skip to content

Commit d9008d4

Browse files
committed
Added class to passwordinput
1 parent 52ed67f commit d9008d4

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Diff for: crispy_tailwind/templatetags/tailwind_field.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class CrispyTailwindFieldNode(template.Node):
8888
"radioselect": "",
8989
"email": base_input,
9090
"url": base_input,
91-
"password": "",
91+
"password": base_input,
9292
"hidden": "",
9393
"multiplehidden": "",
9494
"file": "",
@@ -158,7 +158,6 @@ def render(self, context): # noqa: C901
158158
css_class = class_name
159159

160160
# Added additional code for Tailwind
161-
162161
if template_pack == "tailwind":
163162
css_container = context.get("css_container", self.default_container)
164163
if css_container:

Diff for: tests/test_filter.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,19 @@ def test_crispy_filter(self):
3737
<label for="id_password1" class="block text-gray-700 text-sm font-bold mb-2">password<span
3838
class="asteriskField">*</span>
3939
</label>
40-
<input type="password" name="password1" maxlength="30" class="passwordinput " required id="id_password1">
40+
<input type="password" name="password1" maxlength="30"
41+
class="passwordinput w-full rounded-lg """
42+
"""border appearance-none py-2 border-gray-300 bg-white text-gray-700 focus:outline-none px-4 block """
43+
"""leading-normal" required id="id_password1">
4144
</div>
4245
4346
<div id="div_id_password2" class=" mb-3">
4447
<label for="id_password2" class="block text-gray-700 text-sm font-bold mb-2">
4548
re-enter password<span class="asteriskField">*</span> </label>
46-
<input type="password" name="password2" maxlength="30" class="passwordinput "
49+
<input type="password" name="password2" maxlength="30"
50+
class="passwordinput w-full rounded-lg """
51+
"""border appearance-none py-2 border-gray-300 bg-white text-gray-700 focus:outline-none px-4 block """
52+
"""leading-normal"
4753
required id="id_password2"> </div>
4854
4955
<div id="div_id_first_name" class=" mb-3">

0 commit comments

Comments
 (0)