The Confirm submit button on the combined pay/writeoff form in members/paycollect.tt doesn't have an id, making it hard for local customisations, hardware integrations (e.g. receipt printer triggers), and automated tests to reliably target the pay action versus the writeoff action - both render as the same markup with only the value/hidden op field differing. This patch adds id="paysubmit" and id="writeoffsubmit" to the two branches of the existing type == 'WRITEOFF' conditional, matching the existing op=cud-pay/op=cud-writeoff split right above it. Test plan: 1. Go to a patron's Pay fines page and select multiple charges 2. Choose Pay - confirm the Confirm button has id="paysubmit" 3. Choose Write off - confirm the Confirm button has id="writeoffsubmit" 4. Confirm both flows still submit and behave exactly as before
Created attachment 203596 [details] [review] Bug 43293: Add IDs to the Pay/Write off confirm buttons on paycollect.tt The Confirm submit button on the combined pay/writeoff form doesn't have an id, making it hard for local customisations, hardware integrations (e.g. receipt printer triggers), and automated tests to reliably target the pay action versus the writeoff action - both render as the same markup with only the value/hidden op field differing. Add id="paysubmit" and id="writeoffsubmit" to the two branches of the existing type == 'WRITEOFF' conditional, matching the existing op=cud-pay/op=cud-writeoff split right above it. Test plan: 1) Go to a patron's Pay fines page and select multiple charges 2) Choose Pay - confirm the Confirm button has id="paysubmit" 3) Choose Write off - confirm the Confirm button has id="writeoffsubmit" 4) Confirm both flows still submit and behave exactly as before
Created attachment 203635 [details] [review] Bug 43293: Add IDs to the Pay/Write off confirm buttons on paycollect.tt The Confirm submit button on the combined pay/writeoff form doesn't have an id, making it hard for local customisations, hardware integrations (e.g. receipt printer triggers), and automated tests to reliably target the pay action versus the writeoff action - both render as the same markup with only the value/hidden op field differing. Add id="paysubmit" and id="writeoffsubmit" to the two branches of the existing type == 'WRITEOFF' conditional, matching the existing op=cud-pay/op=cud-writeoff split right above it. Test plan: 1) Go to a patron's Pay fines page and select multiple charges 2) Choose Pay - confirm the Confirm button has id="paysubmit" 3) Choose Write off - confirm the Confirm button has id="writeoffsubmit" 4) Confirm both flows still submit and behave exactly as before Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 203636 [details] [review] Bug 43293: (follow-up) Make the same change to two other buttons There are also confirm buttons for pay_individual and writeoff_individual. This patch also makes a minor HTML correction: <div class="action"> should be <fieldset class="action">.
Thanks for the testing and follow-up Owen :)
Created attachment 206150 [details] [review] Bug 43293: Add IDs to the Pay/Write off confirm buttons on paycollect.tt The Confirm submit button on the combined pay/writeoff form doesn't have an id, making it hard for local customisations, hardware integrations (e.g. receipt printer triggers), and automated tests to reliably target the pay action versus the writeoff action - both render as the same markup with only the value/hidden op field differing. Add id="paysubmit" and id="writeoffsubmit" to the two branches of the existing type == 'WRITEOFF' conditional, matching the existing op=cud-pay/op=cud-writeoff split right above it. Test plan: 1) Go to a patron's Pay fines page and select multiple charges 2) Choose Pay - confirm the Confirm button has id="paysubmit" 3) Choose Write off - confirm the Confirm button has id="writeoffsubmit" 4) Confirm both flows still submit and behave exactly as before Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 206151 [details] [review] Bug 43293: (follow-up) Make the same change to two other buttons There are also confirm buttons for pay_individual and writeoff_individual. This patch also makes a minor HTML correction: <div class="action"> should be <fieldset class="action">. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Thanks everyone! Pushed to main for 26.11!