TrangPham / django-admin-confirm

AdminConfirmMixin is a mixin for ModelAdmin that adds confirmations to changes, additions and actions.
Other
129 stars 16 forks source link

Change confirmations for file fields break #50

Open relwell opened 1 year ago

relwell commented 1 year ago

Describe the bug Can't submit the confirmation form because of a javascript error:

An invalid form control with name='' is not focusable.

To Reproduce Steps to reproduce the behavior:

  1. Trigger the confirmation flow on a model that has files, making sure you've attached a file during the process.
  2. Try to confirm. It won't work.

Expected behavior

  1. Clicking confirm should work.

Versions (please complete the following information):

Additional context Adding novalidate to the form should do the trick. It's the workaround I'll be using for now.

TrangPham commented 1 year ago

Thanks for reporting. I'll try updating the html or scripts that a loading for the confirmation page.

A PR is also welcomed from anyone in the community. Thanks :)