Opened 21 months ago

Last modified 9 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:

  1. Choose admin for any model instance where attachment is not required and has some validation,
  2. check "Clear" next to the attachment, and change the form, so validation would fail,
  3. Save form, validation error would occur, attachment and "Clear" would be empty
  4. make form valid again and Save, attachment woult not be cleared

(I am attaching example screenshots)

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top