﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7576	Fieldsets marked as collapsed should not be collapsed on errors	Jonas von Poser	nobody	"'''Current behaviour:'''

Using newforms-admin, I edit a model field that's contained in a collapsible fieldset. If this field does not validate, for instance I input a character string in an IntegerField, the page gets redisplayed after submitting and an error gets shown next to the field. On the redisplayed edit page, the fieldset containing the error is collapsed again.

'''Expected behaviour:'''

When a fieldset contains an error, it should not be collapsed so the error can be found easily. In fact, the comments in django/contrib/admin/media/js/admin/CollapsedFieldsets.js:22 say so: ""Collapsing shouldn't apply in the case of error messages.""

'''Fix:'''

The bug is in djang/contrib/admin/media/js/CollapsedFieldsets.js in the function named ""fieldset_has_errors"". A loop checks for the CSS class ""error"", but the DIV displaying the error is currently marked with a class called ""errors"".

I've attached a patch that fixes this. Thank you for considering it."		closed	Contrib apps	newforms-admin		duplicate	nfa		Unreviewed	1	0	0	0	0	0
