Skip to content

Commit

Permalink
fix(tailwind): apply disabled style on readonly fields
Browse files Browse the repository at this point in the history
  • Loading branch information
igr-santos committed Oct 6, 2023
1 parent a69e3a9 commit 44771e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/tailwind/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 44771e5

Please sign in to comment.