Opened 19 months ago
Last modified 8 months ago
#34488 closed Cleanup/optimization
ClearableFileInput widget forgets "Clear" selection when form is not valid — at Initial Version
Reported by: | bmihelac | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 4.1 |
Severity: | Normal | Keywords: | admin, forms, ClearableFileInput |
Cc: | Marcelo Galigniana | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
ClearableFileInput widget forgets "Clear" selection when form is not valid, that causes file would not be deleted once when form is valid again. This can be inconvinient, especially for forms with many fields.
To reproduce:
- Choose admin for any model instance where attachment is not required and has some validation,
- check "Clear" next to the attachment, and change the form, so validation would fail,
- Save form, validation error would occur, attachment and "Clear" would be empty
- make form valid again and Save, attachment woult not be cleared
(I am attaching example screenshots)
Note:
See TracTickets
for help on using tickets.