To reproduce: - create a club - put 1 patron in your club - find a bib - Click Holds, then Clubs - search for your club, confirm hold detail - click Place Hold - nothing happens
Created attachment 169315 [details] [review] Bug 37374: Fix functionality of 'Place hold' button for club holds To test: 1) create a club 2) put 1 patron in your club 3) find a bib 4) Click Holds, then Clubs 5) search for your club, confirm hold detail 6) click Place Hold 7) nothing happens 8) Apply patch 9) Refresh page and click 'Place hold' again 10) Hold is properly placed
Created attachment 169319 [details] [review] Bug 37374: Fix functionality of 'Place hold' button for club holds To test: 1) create a club 2) put 1 patron in your club 3) find a bib 4) Click Holds, then Clubs 5) search for your club, confirm hold detail 6) click Place Hold 7) nothing happens 8) Apply patch 9) Refresh page and click 'Place hold' again 10) Hold is properly placed Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Created attachment 169420 [details] [review] Bug 37374: Fix functionality of 'Place hold' button for club holds To test: 1) create a club 2) put 1 patron in your club 3) find a bib 4) Click Holds, then Clubs 5) search for your club, confirm hold detail 6) click Place Hold 7) nothing happens 8) Apply patch 9) Refresh page and click 'Place hold' again 10) Hold is properly placed Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
I should have read this more closely before pushing.. we can't just switch to POST as it triggers the csrf protection QA failures.. we need to handle this properly.
(In reply to Martin Renvoize from comment #5) > I should have read this more closely before pushing.. we can't just switch > to POST as it triggers the csrf protection QA failures.. we need to handle > this properly. Ah sorry, I didn't catch that because I use mojolicious apps which are not CSRF-protected (someone, please QA bug 36598 :))
Created attachment 169497 [details] [review] Bug 37374: Pass CSRF Token
We're also failing the tests as there's no 'op' included here ;) But.. in both cases I believe we're not actually posting a form anyway.. it's getting caught by JS and submitted via ajax to the API which doesn't yet require op or a csrf token. I think we need to clean up a bit in general
Created attachment 169548 [details] [review] Bug 37374: (follow-up) Add csrf token and op to form This patch adds a hidden op input and csrf token to the clubs hold request form. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Backported to 24.05.x for upcoming 24.05.04
"cud-" not for 23.11.x