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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt (-1 / +16 lines)
Lines 11-21 $(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
    $("#conditional_field,#from_field").change(function(){
16
        updateWarnings(); // For 3.14.x branches only, if bug 11319 is not pushed into
17
    });
14
});
18
});
15
//]]>
19
//]]>
16
</script>
20
</script>
17
21
18
<script>
22
<script>
23
24
function updateWarnings(){
25
    if ( $("#conditional_field").is(":visible") ) {
26
        if ( $("#conditional_field").val() == $("#from_field").val() && $("#from_field").val().length > 0 ) {
27
            $("#warning_multivalued").show();
28
        } else {
29
            $("#warning_multivalued").hide();
30
        }
31
    }
32
}
33
19
function onActionChange(selectObj) {
34
function onActionChange(selectObj) {
20
    // get the index of the selected option
35
    // get the index of the selected option
21
    var idx = selectObj.selectedIndex;
36
    var idx = selectObj.selectedIndex;
Lines 400-405 function setSelectByValue( selectId, value ) { Link Here
400
                    <a name="modaction"></a>
415
                    <a name="modaction"></a>
401
                    <fieldset>
416
                    <fieldset>
402
                        <legend id="modaction_legend">Add a new action</legend>
417
                        <legend id="modaction_legend">Add a new action</legend>
418
                        <div id="warning_multivalued" style="color:red; display:none;">You have chosen a condition on the same field as the original field. If your records contain multivalued fields it is highly recommended not to do that.</div>
403
419
404
                        <select name="action" id="action" onchange="onActionChange(this);">
420
                        <select name="action" id="action" onchange="onActionChange(this);">
405
                            <option value="delete_field">Delete</option>
421
                            <option value="delete_field">Delete</option>
406
- 

Return to bug 11414