@@ -, +, @@ Regexp checkbox Do not check the RegEx checkbox after the "To" field. should be unchecked. created in 3) and click on 'Update action'. When you re-edit this action the 'RegEx' checkbox should be checked. --- .../intranet-tmpl/prog/js/marc_modification_templates.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js +++ a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js @@ -255,12 +255,16 @@ function editAction( mmta_id, ordering, action, field_number, from_field, from_s document.getElementById('field_value').value = field_value; document.getElementById('to_field').value = to_field; document.getElementById('to_subfield').value = to_subfield; - $("#to_regex_search").val(to_regex_search); - $("#to_regex_replace").val(to_regex_replace); - $("#to_regex_modifiers").val(to_regex_modifiers); - - document.getElementById('to_field_regex').checked = conditional_regex.length; - document.getElementById('to_field_regex').onchange(); + if ( to_regex_search == '' && to_regex_replace == '' && to_regex_modifiers == '' ) { + document.getElementById('to_field_regex').checked = false; + document.getElementById('to_field_regex').onchange(); + } else { + document.getElementById('to_field_regex').checked = true; + document.getElementById('to_field_regex').onchange(); + $("#to_regex_search").val(to_regex_search); + $("#to_regex_replace").val(to_regex_replace); + $("#to_regex_modifiers").val(to_regex_modifiers); + } setSelectByValue( 'conditional', conditional ); document.getElementById('conditional').onchange(); --