Koha/koha-tmpl/intranet-tmpl/prog/en/includes/str/members-menu.inc
Martin Renvoize 138fb47e1f Bug 15788: Use delete_borrowers permission
Link the new delete_borrowers sub-permission to the delete actions.

Test plan
1/ Remove the delete_borrowers permission from a staff user
2/ Check that the user cannot use the 'Delete' option from the members
menu.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-06-21 13:50:26 +02:00

38 lines
1.5 KiB
PHP

[% USE scalar %]
[% USE Koha %]
[% USE Categories %]
<!-- str/members-menu.inc -->
<script>
var advsearch = "[% advsearch | html %]";
var destination = "[% destination | html %]";
var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers | html %]";
var CAN_user_borrowers_delete_borrowers = "[% CAN_user_borrowers_delete_borrowers | html %]";
var dateformat = "[% Koha.Preference('dateformat') | html %]";
var borrowernumber;
var number_of_adult_categories = 0;
[% IF patron %]
borrowernumber = "[% patron.borrowernumber | html %]";
[% IF patron.is_child %]
[% SET adult_categories = Categories.scalar.all(category_type => 'A') %]
[% SET number_of_adult_categories = adult_categories.count %]
number_of_adult_categories = [% number_of_adult_categories | html %]
[% END %]
[% END %]
[% IF ( patron.image ) %]
$("body").on("click", "#delpicture", function(){
return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
});
$('#manage-patron-image').find("input[value*=Upload]").click(function(){
if($("#uploadfile").val() == ""){
alert(_("Please choose a file to upload"));
return false;
}
return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
});
[% END %]
</script>
<!-- / str/members-menu.inc -->