We've got the upload file field as a required field for patron image, which means that if you try to delete the existing patron image... it won't work because it'll prompt you to upload an image. Basically there is 1 HTML form and there should be 2. Should be an easy fix, but I'm not working on it currently.
Created attachment 169754 [details] [review] Bug 37489: Separate forms for uploading and deleting a patron image This patch creats a new form for image deletion that is submitted via the 'Delete' button on the modal. To test: 1) Turon on the 'patronimages' sys pref 2) Visit a patron page, you should see an image module on the left. 3) Click on the image to edit it. Upload a new image. 4) Edit the image again, press delete and confirm the popup. 5) Note that it will not let you delete because of the required file. 6) Apply patch 7) Attempt to delete again, this time it is successful.
Created attachment 169766 [details] [review] Bug 37489: Separate forms for uploading and deleting a patron image This patch creats a new form for image deletion that is submitted via the 'Delete' button on the modal. To test: 1) Turon on the 'patronimages' sys pref 2) Visit a patron page, you should see an image module on the left. 3) Click on the image to edit it. Upload a new image. 4) Edit the image again, press delete and confirm the popup. 5) Note that it will not let you delete because of the required file. 6) Apply patch 7) Attempt to delete again, this time it is successful. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Created attachment 169803 [details] [review] Bug 37489: Separate forms for uploading and deleting a patron image This patch creats a new form for image deletion that is submitted via the 'Delete' button on the modal. To test: 1) Turon on the 'patronimages' sys pref 2) Visit a patron page, you should see an image module on the left. 3) Click on the image to edit it. Upload a new image. 4) Edit the image again, press delete and confirm the popup. 5) Note that it will not let you delete because of the required file. 6) Apply patch 7) Attempt to delete again, this time it is successful. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: David Cook <dcook@prosentient.com.au>
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.04
"cud-" not in 23.11.x