Bug 40445: (follow-up) Add default cud- op value to cashup selected form

The two-phase cashup workflow added a 'Cashup selected registers' modal
whose form's op hidden input had an empty value, populated at runtime by
JavaScript. xt/find-missing-op-in-forms.t parses templates statically and
flagged the empty op value as not starting with 'cud-' (see bug 34478).

Set a sensible default of 'cud-cashup_start'; the JS click handlers still
overwrite the value before submission, so behaviour is unchanged.

Test plan:
1. prove xt/find-missing-op-in-forms.t => now passes

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Martin Renvoize 2026-07-01 07:41:06 +01:00 committed by Pedro Amorim
parent a4ba11af06
commit 09642be4db
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@
</div>
<div class="modal-footer">
<input type="hidden" name="registerid" id="selected_registers_field" value="" />
<input type="hidden" name="op" id="selected_operation" value="" />
<input type="hidden" name="op" id="selected_operation" value="cud-cashup_start" />
<button type="button" class="btn btn-primary" id="start_selected_btn">Start cashup for selected</button>
<button type="button" class="btn btn-success" id="quick_selected_btn">Quick cashup for selected</button>
<button type="button" class="btn btn-default" data-bs-dismiss="modal">Cancel</button>