View | Details | Raw Unified | Return to bug 8015
Collapse All | Expand All

(-)a/Koha/SimpleMARC.pm (-1 / +1 lines)
Lines 239-245 sub field_equals { Link Here
239
239
240
  if ( $regex ) {
240
  if ( $regex ) {
241
    C4::Koha::Log( "Testing '$field_value' =~ m$value" ) if $debug >= 3;
241
    C4::Koha::Log( "Testing '$field_value' =~ m$value" ) if $debug >= 3;
242
    return eval "\$field_value =~ m$value";
242
    return $field_value =~ m/$value/;
243
  } else {
243
  } else {
244
    return $field_value eq $value;
244
    return $field_value eq $value;
245
  }
245
  }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt (-4 / +8 lines)
Lines 9-14 $(document).ready(function() { Link Here
9
    $('#select_template').change(function() {
9
    $('#select_template').change(function() {
10
        $('#select_template').submit();
10
        $('#select_template').submit();
11
    });
11
    });
12
    $("span.match_regex_prefix" ).hide();
13
    $("span.match_regex_suffix" ).hide();
12
});
14
});
13
//]]>
15
//]]>
14
</script>
16
</script>
Lines 97-105 function onToFieldRegexChange( checkboxObj ) { Link Here
97
99
98
function onConditionalRegexChange( checkboxObj ) {
100
function onConditionalRegexChange( checkboxObj ) {
99
    if ( checkboxObj.checked ) {
101
    if ( checkboxObj.checked ) {
100
        document.getElementById( 'match_regex_prefix' ).style.visibility='visible';
102
        $("span.match_regex_prefix" ).show();
103
        $("span.match_regex_suffix" ).show();
101
    } else {
104
    } else {
102
        document.getElementById( 'match_regex_prefix' ).style.visibility='hidden';
105
        $("span.match_regex_prefix" ).hide();
106
        $("span.match_regex_suffix" ).hide();
103
    }
107
    }
104
}
108
}
105
109
Lines 346-352 function setSelectByValue( selectId, value ) { Link Here
346
                                        [% IF ( ActionsLoo.conditional_comparison_equals ) %] matches [% END %]
350
                                        [% IF ( ActionsLoo.conditional_comparison_equals ) %] matches [% END %]
347
                                        [% IF ( ActionsLoo.conditional_comparison_not_equals ) %] does not match [% END %]
351
                                        [% IF ( ActionsLoo.conditional_comparison_not_equals ) %] does not match [% END %]
348
352
349
                                        [% IF ( ActionsLoo.conditional_regex ) %] RegEx m[% END %]<strong>[% ActionsLoo.conditional_value %]</strong>
353
                                        [% IF ( ActionsLoo.conditional_regex ) %] RegEx m/[% END %]<strong>[% ActionsLoo.conditional_value %]/</strong>
350
                                    [% END %]
354
                                    [% END %]
351
                                </td>
355
                                </td>
352
                                <td>[% ActionsLoo.description %]</td>
356
                                <td>[% ActionsLoo.description %]</td>
Lines 438-444 function setSelectByValue( selectId, value ) { Link Here
438
442
439
                            <span name="conditional_comparison_block" id="conditional_comparison_block" style="display:none;">
443
                            <span name="conditional_comparison_block" id="conditional_comparison_block" style="display:none;">
440
444
441
                                <span id="match_regex_prefix" style="visibility:hidden;">m</span><input type="text" id="conditional_value" name="conditional_value" />
445
                                <span class="match_regex_prefix">m/</span><input type="text" id="conditional_value" name="conditional_value" /><span class="match_regex_suffix">/</span>
442
446
443
                                <sup>
447
                                <sup>
444
                                    <label for="conditional_regex">RegEx</label>
448
                                    <label for="conditional_regex">RegEx</label>
(-)a/t/db_dependent/MarcModificationTemplates.t (-2 / +1 lines)
Lines 178-184 is( AddModificationTemplateAction( Link Here
178
    $template_id, 'move_field', 0,
178
    $template_id, 'move_field', 0,
179
    '952', 'd', '',
179
    '952', 'd', '',
180
    '952', 'e', '',
180
    '952', 'e', '',
181
    'if', '952', 'c', 'equals', '/^GEN/', '1',
181
    'if', '952', 'c', 'equals', '^GEN', '1',
182
    'Move field 952$d to 952$e if 952$c =~ /^GE/'
182
    'Move field 952$d to 952$e if 952$c =~ /^GE/'
183
), 1, 'Add fourth action: move field 952$d to 952$e if 952$c =~ /^GE/');
183
), 1, 'Add fourth action: move field 952$d to 952$e if 952$c =~ /^GE/');
184
184
185
- 

Return to bug 8015