When you add an action to a Marc modification template, there's a RegEx checkbox for replacing data in the field. This checkbox is automatically checked if you edit the action, even when you did not check it when saving the action. To reproduce: 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked.
Created attachment 82424 [details] [review] Bug 21819: Marc modification templates action always checks Regexp checkbox When editing a MARC modification template action, the 'RegEx' checkbox to the right of the 'to field' textboxes will always appear checked, even if no regular expression has been added. This patch fixes that. Test plan (steps 1-5 are copied from the original report -- thanks Pasi!): 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked. 6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser. 7) Edit the action you saved in 4): this time the 'RegEx' checkbox should be unchecked. 8) For completeness, add a regular expression to the "Move" action created in 3) and click on 'Update action'. When you re-edit this action the 'RegEx' checkbox should be checked.
Created attachment 82427 [details] [review] Bug 21819: Marc modification templates action always checks Regexp checkbox When editing a MARC modification template action, the 'RegEx' checkbox to the right of the 'to field' textboxes will always appear checked, even if no regular expression has been added. This patch fixes that. Test plan (steps 1-5 are copied from the original report -- thanks Pasi!): 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked. 6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser. 7) Edit the action you saved in 4): this time the 'RegEx' checkbox should be unchecked. 8) For completeness, add a regular expression to the "Move" action created in 3) and click on 'Update action'. When you re-edit this action the 'RegEx' checkbox should be checked. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Created attachment 82551 [details] [review] Bug 21819: Marc modification templates action always checks Regexp checkbox When editing a MARC modification template action, the 'RegEx' checkbox to the right of the 'to field' textboxes will always appear checked, even if no regular expression has been added. This patch fixes that. Test plan (steps 1-5 are copied from the original report -- thanks Pasi!): 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked. 6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser. 7) Edit the action you saved in 4): this time the 'RegEx' checkbox should be unchecked. 8) For completeness, add a regular expression to the "Move" action created in 3) and click on 'Update action'. When you re-edit this action the 'RegEx' checkbox should be checked. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 82552 [details] [review] Bug 21819: (QA follow-up) Replace onchange() in touched code AFAIK we should not call document...onchange() and assume that it works. Apparently, it does at least in some browsers. But we are not sure. We could easily replace them here by the documented jQuery counterpart. Note: If you try git grep -l -E "onchange\(" you will find some occurrences in two libraries and only in one js file (this one). We should replace all occurrences here; will open a new report for that. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Verified that the change event was triggered: span should expand/collapse.
Created attachment 82555 [details] [review] Bug 21819: (QA follow-up) Replace onchange() in touched code AFAIK we should not call document...onchange() and assume that it works. Apparently, it does at least in some browsers. But we are not sure. We could easily replace them here by the documented jQuery counterpart. Note: If you try git grep -l -E "onchange\(" you will find some occurrences in two libraries and only in one js file (this one). We should replace all occurrences here; will open a new report for that. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Verified that the change event was triggered: span should expand/collapse. Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Awesome work all! Pushed to master for 18.11
Backported to 18.05 for 18.05.07
Pushed to 17.11.x for 17.11.13