Bug 26592: [20.05] Prevent XSS vulnerabilities when circ/ysearch.pl is used
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / str / members-menu.inc
1 [% USE scalar %]
2 [% USE Koha %]
3 [% USE Categories %]
4 <!-- str/members-menu.inc -->
5 <script>
6     var advsearch = "[% advsearch | html %]";
7     var destination = "[% destination | html %]";
8
9     var CAN_user_borrowers_edit_borrowers = "[% CAN_user_borrowers_edit_borrowers | html %]";
10
11     var dateformat = "[% Koha.Preference('dateformat') | html %]";
12
13     var borrowernumber;
14     var number_of_adult_categories = 0;
15     [% IF patron %]
16         borrowernumber = "[% patron.borrowernumber | html %]";
17         [% IF patron.is_child %]
18             [% SET adult_categories = Categories.scalar.all(category_type => 'A') %]
19             [% SET number_of_adult_categories = adult_categories.count %]
20             number_of_adult_categories = [% number_of_adult_categories | html %]
21         [% END %]
22     [% END %]
23
24     [% IF ( patron.image ) %]
25         $("body").on("click", "#delpicture", function(){
26              return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
27         });
28         $('#manage-patron-image').find("input[value*=Upload]").click(function(){
29             if($("#uploadfile").val() == ""){
30                 alert(_("Please choose a file to upload"));
31                 return false;
32             }
33             return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
34         });
35     [% END %]
36 </script>
37 <!-- / str/members-menu.inc -->