Skip to content

feat: warning icon for form errors on tabs #1403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

CiaranSanders
Copy link
Contributor

This feature just simply introduces a small styling change for fieldset and inline tabs, so when a form error occurs, every fieldset and inline tab containing a field with an error now indicates it has an error.

Currently, when a form error occurs and fieldset tabs are in use, it is not clear in which tab the error occured under:
image

Example here a field under the "Other Information" tab had an error:
image

An example when multiple tabs have fields with form errors:
image

Example when multiple inlines with tabs had errors:
image

@CiaranSanders
Copy link
Contributor Author

While testing this some more, I was getting weird behaviors in some model admins where the is_valid method was evaluating to False when it should not have been... Might be just a misunderstanding on my part on how that function is supposed to work.

But I replaced it's usage with total_error_count for determining if an inline tab has any errors under it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant