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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt (-9 / +34 lines)
Lines 21-27 Link Here
21
21
22
[% INCLUDE 'members-toolbar.inc' %]
22
[% INCLUDE 'members-toolbar.inc' %]
23
23
24
<form method="post" action="/cgi-bin/koha/members/member-flags.pl">
24
<form id="flag_form" method="post" action="/cgi-bin/koha/members/member-flags.pl">
25
    <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
25
    <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
26
    <input type="hidden" name="member" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
26
    <input type="hidden" name="member" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
27
    <input type="hidden" name="newflags" value="1" />
27
    <input type="hidden" name="newflags" value="1" />
Lines 33-38 Link Here
33
            <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | html %]"><i class="fa fa-remove"></i> Cancel</a>
33
            <a class="btn btn-default" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | html %]"><i class="fa fa-remove"></i> Cancel</a>
34
            <a class="toggleall toggleall_on btn btn-link" href="#"><i class="fa fa-plus-square-o"></i> Show all</a>
34
            <a class="toggleall toggleall_on btn btn-link" href="#"><i class="fa fa-plus-square-o"></i> Show all</a>
35
            <a class="toggleall toggleall_off btn btn-link" href="#"><i class="fa fa-minus-square-o"></i> Hide all</a>
35
            <a class="toggleall toggleall_off btn btn-link" href="#"><i class="fa fa-minus-square-o"></i> Hide all</a>
36
            <a id="CheckAllFlags" class="btn btn-link" href="#">
37
                <i class="fa fa-check"></i> Select all
38
            </a>
39
            <a id="UncheckAllFlags" class="btn btn-link" href="#">
40
                <i class="fa fa-remove"></i> Clear all
41
            </a>
36
            <div class="btn-group pull-right">
42
            <div class="btn-group pull-right">
37
                Filter: <input type="text" name="permissions_filter" id="permissions_filter" size="20" />
43
                Filter: <input type="text" name="permissions_filter" id="permissions_filter" size="20" />
38
                <a href="#" id="clear_filter" style="display:none"><i class="fa fa-remove"></i></a>
44
                <a href="#" id="clear_filter" style="display:none"><i class="fa fa-remove"></i></a>
Lines 105-110 Link Here
105
        var Sticky;
111
        var Sticky;
106
        $(document).ready(function() {
112
        $(document).ready(function() {
107
113
114
            $("#CheckAllFlags").on("click",function(){
115
                $(".flag").attr("disabled", false);
116
                $(".flag").prop("checked", true);
117
                return false;
118
            });
119
            $("#UncheckAllFlags").on("click",function(){
120
                $(".flag").attr("disabled", false);
121
                $(".flag").prop("checked", false);
122
                return false;
123
            });
124
            $(".flag").change(function(){
125
                if(!$(this).is(':checked')){
126
                    $("input#flag-0").prop("checked", false);
127
                }
128
            });
129
108
            Sticky = $("#permissions_toolbar");
130
            Sticky = $("#permissions_toolbar");
109
            Sticky.hcSticky({
131
            Sticky.hcSticky({
110
                stickTo: "#permissionstree",
132
                stickTo: "#permissionstree",
Lines 144-155 Link Here
144
                    alert(_("Inconsistency detected!") + "\n\n" + _("The superlibrarian privilege is mutually exclusive of other privileges, as it includes them all.") + "\n\n" + _("This patron's privileges will now be reset to include only superlibrarian."));
166
                    alert(_("Inconsistency detected!") + "\n\n" + _("The superlibrarian privilege is mutually exclusive of other privileges, as it includes them all.") + "\n\n" + _("This patron's privileges will now be reset to include only superlibrarian."));
145
                }
167
                }
146
168
147
                $('input[name="flag"]').each(function() {
169
                setLibrarian();
148
                    if($(this).attr('id') != "flag-0" && !$(this).hasClass('superlib') ){
149
                        $(this).prop('disabled', true);
150
                        $(this).prop('checked', false);
151
                    }
152
                });
153
            }
170
            }
154
171
155
            $('input#flag-0').click(function() {
172
            $('input#flag-0').click(function() {
Lines 222-229 Link Here
222
                    }
239
                    }
223
                }
240
                }
224
            });
241
            });
225
226
        });
242
        });
243
244
        function setLibrarian(){
245
            $('input[name="flag"]').each(function() {
246
                if($(this).attr('id') != "flag-0" && !$(this).hasClass('superlib') ){
247
                    $(this).prop('disabled', true);
248
                    $(this).prop('checked', false);
249
                }
250
            });
251
        }
252
227
    </script>
253
    </script>
228
[% END %]
254
[% END %]
229
255
230
- 

Return to bug 22150