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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-2 / +7 lines)
Lines 239-247 Link Here
239
            var extended_attribute_types = [% To.json(extended_attribute_types || []) | $raw %];
239
            var extended_attribute_types = [% To.json(extended_attribute_types || []) | $raw %];
240
        [% END %]
240
        [% END %]
241
241
242
        $(document).ready(function() {
242
        $(document).on("shown.bs.modal", function(){
243
            $('select[name="sort1_filter"]').select2({allowClear:true});
243
            $('select[name="sort1_filter"]').select2({allowClear:true});
244
            $('select[name="sort2_filter"]').select2({allowClear:true});
244
            $('select[name="sort2_filter"]').select2({allowClear:true});
245
        }).on("hidden.bs.modal", function(){
246
            ["sort1_filter", "sort2_filter"].forEach(function(item){
247
                if( $('select[name=' +  item + ']').data("select2") ){
248
                    $('select[name=' +  item + ']').select2("destroy");
249
                }
250
            });
245
        });
251
        });
246
    </script>
252
    </script>
247
253
248
- 

Return to bug 35329