To reproduce: 1. Go to Cataloging > Automatic item modifications by age 2. Click Edit rules 3. Click Add rule 4. Enter some values, such as: age -> 365 age field -> items.dataaccessioned substitution -> items.withdrawn = 1 5. Click Save --> Nothing happens, and the save button remains highlighted Git bisect points to bug 38714
Ah, it's because there are two separate TT sections that check if op = edit_form, with the "save" button in the first section and the actual form fields in the second section. The opening <form> tag was in the first TT IF block, and the closing </form> tag was in the second TT IF block farther down the page. This is not allowed as of 38714, so the opening <form> tag was moved into the second TT IF block...which left the save button out of the form! Hopefully this won't be too big of a refactor to fix...
Created attachment 182172 [details] [review] Bug 39864: Move save button back into form The save button for automatic item modification rules got moved outside of the form during the refactor for bug 38714. This happened because the form was spread between two separate IF blocks that checked the same condition, which is no longer allowed as of 38714. This patch consolidates the conditional blocks and moves the submit button back inside its form. To test: 1. Go to Cataloguing > Item modifications by age 2. Click Add Rules, and then Add Rule to create a new rule 3. Fill in some reasonable values, for example: Age in days: 365 Age field: items.itemlost_on Substitutions: items.withdrawn = 1 4. Click save --> Nothing happens! 5. Apply patch, refresh, the page, and fill values in again if needed 6. Click save again --> The rule is saved! 7. Confirm the Edit rules, Add rule, and Cancel buttons still work i. Click Edit rules --> The rule you just created should now be editable ii. Click Add rule --> A new form for a second rule should be added to the page iii. Click Cancel --> The change is cancelled and the page returns to "List of rules" view