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

(-)a/koha-tmpl/intranet-tmpl/prog/js/messaging-preference-form.js (-4 / +6 lines)
Lines 9-19 $(document).ready(function(){ Link Here
9
    }
9
    }
10
10
11
    if( $("#messaging_prefs_loading").length ){ // This element only appears in the template if op=add
11
    if( $("#messaging_prefs_loading").length ){ // This element only appears in the template if op=add
12
        $('#categorycode_entry').change(function() {
12
        $('#categorycode_entry').change(() => { update_messaging_prefs() });
13
        update_messaging_prefs();
14
15
        function update_messaging_prefs () {
13
            var messaging_prefs_loading = $("#messaging_prefs_loading");
16
            var messaging_prefs_loading = $("#messaging_prefs_loading");
14
            // Upon selecting a new patron category, show "Loading" message for messaging defaults
17
            // Upon selecting a new patron category, show "Loading" message for messaging defaults
15
            messaging_prefs_loading.show();
18
            messaging_prefs_loading.show();
16
            var categorycode = $(this).val();
19
            var categorycode = $('#categorycode_entry').val();
17
            if (message_prefs_dirty) {
20
            if (message_prefs_dirty) {
18
                if (!confirm( __("Change messaging preferences to default for this category?") )) {
21
                if (!confirm( __("Change messaging preferences to default for this category?") )) {
19
                    // Not loading messaging defaults. Hide loading indicator
22
                    // Not loading messaging defaults. Hide loading indicator
Lines 49-55 $(document).ready(function(){ Link Here
49
                    // Loaded messaging defaults. Hide loading indicator
52
                    // Loaded messaging defaults. Hide loading indicator
50
                    messaging_prefs_loading.hide();
53
                    messaging_prefs_loading.hide();
51
                });
54
                });
52
        });
55
        }
53
    }
56
    }
54
57
55
    function toggle_digest(id){
58
    function toggle_digest(id){
56
- 

Return to bug 31610