From 44771e51c35e5d70f322790f083e1f73476c1463 Mon Sep 17 00:00:00 2001 From: Igor Santos Date: Fri, 6 Oct 2023 09:36:29 -0300 Subject: [PATCH] fix(tailwind): apply disabled style on readonly fields --- app/tailwind/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tailwind/forms.py b/app/tailwind/forms.py index 25e84300..465419e9 100644 --- a/app/tailwind/forms.py +++ b/app/tailwind/forms.py @@ -33,7 +33,7 @@ def __init__(self, *args, **kwargs): # Add readonly fields if visible.name in self.Meta.readonly_fields: - visible.field.widget.attrs["disabled"] = True + visible.field.widget.attrs["class"] += " input-disabled" visible.field.widget.attrs["readonly"] = True # Add placeholder to use focus animation label