|
Lines 22-28
Link Here
|
| 22 |
<div class="yui-b"> |
22 |
<div class="yui-b"> |
| 23 |
[% INCLUDE 'members-toolbar.inc' %] |
23 |
[% INCLUDE 'members-toolbar.inc' %] |
| 24 |
|
24 |
|
| 25 |
<form method="post" action="/cgi-bin/koha/members/member-flags.pl"> |
25 |
<p> |
|
|
26 |
<a id="CheckAllFlags" href="#"> |
| 27 |
<i class="fa fa-check"> |
| 28 |
</i> |
| 29 |
Select all |
| 30 |
</a> |
| 31 |
<a id="UncheckAllFlags" href="#"> |
| 32 |
<i class="fa fa-remove"> |
| 33 |
</i> |
| 34 |
Clear all |
| 35 |
</a> |
| 36 |
</p> |
| 37 |
|
| 38 |
<form id="flag_form" method="post" action="/cgi-bin/koha/members/member-flags.pl"> |
| 26 |
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" /> |
39 |
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" /> |
| 27 |
<input type="hidden" name="member" id="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
40 |
<input type="hidden" name="member" id="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
| 28 |
<input type="hidden" name="newflags" value="1" /> |
41 |
<input type="hidden" name="newflags" value="1" /> |
|
Lines 93-98
Link Here
|
| 93 |
<!-- set up tree --> |
106 |
<!-- set up tree --> |
| 94 |
<script type="text/javascript"> |
107 |
<script type="text/javascript"> |
| 95 |
$(document).ready(function() { |
108 |
$(document).ready(function() { |
|
|
109 |
|
| 110 |
$("#CheckAllFlags").on("click",function(){ |
| 111 |
$(".flag").attr("disabled", false); |
| 112 |
$(".flag").prop("checked", true); |
| 113 |
return false; |
| 114 |
}); |
| 115 |
$("#UncheckAllFlags").on("click",function(){ |
| 116 |
$(".flag").attr("disabled", false); |
| 117 |
$(".flag").prop("checked", false); |
| 118 |
return false; |
| 119 |
}); |
| 120 |
$(".flag").change(function(){ |
| 121 |
if(!$(this).is(':checked')){ |
| 122 |
$("input#flag-0").prop("checked", false); |
| 123 |
} |
| 124 |
}); |
| 125 |
|
| 96 |
$("#permissionstree").treeview({animated: "fast", collapsed: true}); |
126 |
$("#permissionstree").treeview({animated: "fast", collapsed: true}); |
| 97 |
|
127 |
|
| 98 |
// Enforce Superlibrarian Privilege Mutual Exclusivity |
128 |
// Enforce Superlibrarian Privilege Mutual Exclusivity |
|
Lines 101-112
Link Here
|
| 101 |
alert(_("Inconsistency detected! The superlibrarian privilege is mutually exclusive of other privileges, as it includes them all. This patron's privileges will now be reset to include only superlibrarian.")); |
131 |
alert(_("Inconsistency detected! The superlibrarian privilege is mutually exclusive of other privileges, as it includes them all. This patron's privileges will now be reset to include only superlibrarian.")); |
| 102 |
} |
132 |
} |
| 103 |
|
133 |
|
| 104 |
$('input[name="flag"]').each(function() { |
134 |
setLibrarian(); |
| 105 |
if($(this).attr('id') != "flag-0" && !$(this).hasClass('superlib') ){ |
|
|
| 106 |
$(this).prop('disabled', true); |
| 107 |
$(this).prop('checked', false); |
| 108 |
} |
| 109 |
}); |
| 110 |
} |
135 |
} |
| 111 |
|
136 |
|
| 112 |
$('input#flag-0').click(function() { |
137 |
$('input#flag-0').click(function() { |
|
Lines 135-140
Link Here
|
| 135 |
|
160 |
|
| 136 |
}); |
161 |
}); |
| 137 |
|
162 |
|
|
|
163 |
function setLibrarian(){ |
| 164 |
$('input[name="flag"]').each(function() { |
| 165 |
if($(this).attr('id') != "flag-0" && !$(this).hasClass('superlib') ){ |
| 166 |
$(this).prop('disabled', true); |
| 167 |
$(this).prop('checked', false); |
| 168 |
} |
| 169 |
}); |
| 170 |
} |
| 171 |
|
| 138 |
// manage checking/unchecking parent permissions |
172 |
// manage checking/unchecking parent permissions |
| 139 |
var originalChildStates = {}; /* keep track of subpermission checkbox values |
173 |
var originalChildStates = {}; /* keep track of subpermission checkbox values |
| 140 |
so that user can recover from accidentally |
174 |
so that user can recover from accidentally |
| 141 |
- |
|
|