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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt (-3 / +26 lines)
Lines 11-16 $(document).ready(function() { Link Here
11
    });
11
    });
12
    $("span.match_regex_prefix" ).hide();
12
    $("span.match_regex_prefix" ).hide();
13
    $("span.match_regex_suffix" ).hide();
13
    $("span.match_regex_suffix" ).hide();
14
15
    $("#add_action").submit(function(){
16
        var action = $("#action").val();
17
        if ( action == 'move_field' || action == 'copy_field' ) {
18
            if ( $("#from_subfield").val().length != $("#to_subfield").val().length ) {
19
                alert(_("Both subfield values should be filled or empty."));
20
                return false;
21
            }
22
            if ( $("#to_field").val().length <= 0 ) {
23
                alert(_("The destination should be filled."));
24
                return false;
25
            }
26
        }
27
        if ( action == 'update_field' ) {
28
            if ( $("#from_subfield").val().length <= 0 ) {
29
                alert(_("The source subfield should be filled for update."));
30
                return false;
31
            }
32
        }
33
        if ( $("#from_field").val().length <= 0 ) {
34
            alert(_("The source field should be filled."));
35
            return false;
36
        }
37
    });
14
});
38
});
15
//]]>
39
//]]>
16
</script>
40
</script>
Lines 415-428 function setSelectByValue( selectId, value ) { Link Here
415
                            </select>
439
                            </select>
416
                        </span>
440
                        </span>
417
441
418
                        field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" />
442
                        field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" title="let blank for the entire field" />
419
443
420
                        <span name="with_value_block" id="with_value_block" style="display:none;">
444
                        <span name="with_value_block" id="with_value_block" style="display:none;">
421
                            with value <input type="text" name="field_value" id="field_value" />
445
                            with value <input type="text" name="field_value" id="field_value" />
422
                        </span>
446
                        </span>
423
447
424
                        <span name="to_field_block" id="to_field_block" style="display:none;">
448
                        <span name="to_field_block" id="to_field_block" style="display:none;">
425
                            to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" />
449
                            to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" title="let blank for the entire field" />
426
450
427
                            <span name="to_field_regex_block" id="to_field_regex_block">
451
                            <span name="to_field_regex_block" id="to_field_regex_block">
428
                                <sup>
452
                                <sup>
429
- 

Return to bug 11319