#35065: Django Admin doesn't render autocomplete field whith error color border
properly.
-------------------------------------+-------------------------------------
Reporter: Rigoberto | Owner: nobody
Villalta |
Type: Bug | Status: new
Component: | Version: 4.2
contrib.admin | Keywords: Django 5.0, Django
Severity: Normal | 4.2, Django Admin
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-------------------------------------+-------------------------------------
In Django Admin, if the validations of an autocomplete fields fails, the
border of the input field isn't´n of the error color (#ba2121 by default).
Why? Because in that case the {{{select html element}}} is hidden.
You can test it int this repo [https://github.com/Rigo-Villalta/django-
autocomplete-error-not-visible].
Solution: I think the best solution is to add to the end of the file
''/static/admin/css/autocomplete.css'' the following rule:
{{{
.errors .select2-selection {
border: 1px solid var(--error-fg);
}
}}}
Someone could think that add the selector to the '' base.css'' file could
works, but for inheritance doesn't work.
I will push the pull request in a minutes, but I am not sure if is the
best solution.
--
Ticket URL: <https://code.djangoproject.com/ticket/35065>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018cad5cf557-4226e997-9d47-4838-83aa-48a5de69f416-000000%40eu-central-1.amazonses.com.