Bug 36880: Record overlay rules are not validated
This patch fixes validation of rules, confirmation on deletion of rules and removes some unused source code.
1) Validation of record overlay rules on edit and add action
2) Validation when editing an existing rule
3) Adds confirm when deleting multiple rules
Test plan:
1)
a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl
b) just click + Add rule
c) a new rule with an empty tag is saved
2)
a) edit an existing rule
b) empty input value for tag
c) click Save and check that the rule has now an empty value for tag
3)
a) delete a rule by checking the checkbox and clicking Delete selected
b) delete a rule by clicking the Delete button under Actions
c) notice that b) asks for confirmation
apply patch
1) redo steps and check that form does not get submitted and the input is marked as required
2) redo steps and check that clicking on Save will not submit the form and mark input as required
3) redo steps and check that a standard confirm popup appears
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit
909a72c58f07fbb7f8eb8d858641779239903bdc)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>