dcd1f5d48c
Here we go, next step then. As we did not fix the performance issue when autofiltering the variables (see bug 20975), the only solution we have is to add the filters explicitely. This patch has been autogenerated (using add_html_filters.pl, see next pathces) and add the html filter to all the variables displayed in the template. Exceptions are made (using the new 'raw' TT filter) to the variable we already listed in the previous versions of this patch. To test: - Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated data which contain <script> tags - Remove them from borrower_debarments.comments (there are allowed here) update borrower_debarments set comment="html tags possible here"; - From the interface hit page and try to catch alert box. If you find one it means you find a possible XSS. To know where it comes from: * note the exact URL where you found it * note the alert box content * Dump your DB and search for the string in the dump to identify its location (for instance table.field) Next: * Ideally we would like to use the raw filter when it is not necessary to HTML escape the variables (in big loop for instance) * Provide a QA script to catch missing filters (we want html, uri, url or raw, certainly others that I am forgetting now) * Replace the html filters with uri when needed (!) Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
226 lines
12 KiB
Text
226 lines
12 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% USE Branches %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Circulation › Holds awaiting pickup</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% Asset.css("css/datatables.css") | $raw %]
|
|
</head>
|
|
|
|
<body id="circ_waitingreserves" class="circ">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'circ-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
|
|
› <a href="/cgi-bin/koha/circ/waitingreserves.pl">Holds awaiting pickup</a>
|
|
</div>
|
|
|
|
[% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
[% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
|
|
<div class="yui-g">
|
|
|
|
<h2>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]
|
|
[% IF ( all_branches_link ) %]
|
|
<span style="margin-left:20px"><a href="[% all_branches_link | html %]">
|
|
View all libraries</a></span>
|
|
[% END %]
|
|
</h2>
|
|
[% IF ( cancel_result ) %]
|
|
[% FOREACH cancel_result %]
|
|
[% IF ( messagetransfert ) %]
|
|
<div class="dialog message">
|
|
<h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) | html %]</h2>
|
|
<p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong> [% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
|
|
Please retain this item and check it in to process the hold.
|
|
</p>
|
|
<form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab | html %]" method="post">
|
|
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
[% IF ( waiting ) %]
|
|
<div class="dialog message">
|
|
<h2>This item is on hold for pick-up at your library</h2>
|
|
<p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong>[% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
|
|
Please retain this item and check it in to process the hold.
|
|
</p>
|
|
<form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab | html %]" method="post">
|
|
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
[% ELSE %]
|
|
<div id="resultlist" class="toptabs">
|
|
<ul>
|
|
<li><a href="#holdswaiting">Holds waiting: [% reservecount | html %]</a></li>
|
|
<li>
|
|
<a href="#holdsover">
|
|
Holds waiting over [% ReservesMaxPickUpDelay | html %] days: [% overcount | html %]
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<div id="holdswaiting">
|
|
[% IF ( reserveloop ) %]
|
|
<table id="holdst">
|
|
<thead><tr>
|
|
<th class="title-string">Waiting since</th>
|
|
<th class="title-string">Date hold placed</th>
|
|
<th class="anti-the">Title</th>
|
|
<th>Patron</th>
|
|
<th>Home branch</th>
|
|
<th>Current location</th>
|
|
<th>Call number</th>
|
|
<th>Copy number</th>
|
|
<th>Enumeration</th>
|
|
<th>Action</th>
|
|
</tr></thead>
|
|
<tbody>[% FOREACH reserveloo IN reserveloop %]
|
|
<tr>
|
|
<td><span title="[% reserveloo.waitingdate | html %]">[% reserveloo.waitingdate | $KohaDates %]</span></td>
|
|
<td><span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %]</span></td>
|
|
<td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
|
|
[% reserveloo.title | html %] [% FOREACH subtitl IN reserveloo.subtitle %] [% subtitl.subfield | html %][% END %]
|
|
</a>
|
|
[% UNLESS ( item_level_itypes ) %][% IF ( reserveloo.itemtype ) %] (<b>[% reserveloo.itemtype | html %]</b>)[% END %][% END %]
|
|
<br />Barcode: [% reserveloo.barcode | html %]
|
|
</td>
|
|
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.patron.borrowernumber | html %]">[% reserveloo.patron.surname | html %], [% reserveloo.patron.firstname | html %]</a>
|
|
[% IF ( reserveloo.patron.phone ) %]<br />[% reserveloo.patron.phone | html %][% END %]
|
|
[% IF ( reserveloo.patron.first_valid_email_address ) %]<br /><a href="mailto:[% reserveloo.patron.first_valid_email_address | html %]?subject=Hold waiting: [% reserveloo.title | html %]">
|
|
[% reserveloo.patron.first_valid_email_address | html %]</a>[% END %]
|
|
</td>
|
|
<td>[% Branches.GetName( reserveloo.homebranch ) | html %]</td>
|
|
<td>[% Branches.GetName( reserveloo.holdingbranch ) | html %]</td>
|
|
<td>[% reserveloo.itemcallnumber | html %]</td>
|
|
<td>[% reserveloo.copynumber | html %]</td>
|
|
<td>[% reserveloo.enumchron | html %]</td>
|
|
<td>
|
|
<form name="cancelReserve" action="waitingreserves.pl" method="post">
|
|
<input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernum | html %]" />
|
|
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber | html %]" />
|
|
<input type="hidden" name="fbr" value="[% reserveloo.holdingbranch | html %]" />
|
|
<input type="hidden" name="tbr" value="[% reserveloo.homebranch | html %]" />
|
|
<input type="hidden" name="tab" value="holdswaiting">
|
|
[% IF ( reserveloo.dotransfer ) %]
|
|
<input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" />
|
|
[% ELSE %]
|
|
<input type="submit" value="Cancel hold" />
|
|
[% END %]
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
[% END %]</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<div class="dialog message">No holds found.</div>
|
|
[% END %]
|
|
</div>
|
|
<div id="holdsover">
|
|
[% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.</p>[% END %]
|
|
[% IF ( overloop ) %]
|
|
<form name="cancelAllReserve" action="waitingreserves.pl" method="post">
|
|
<input type="hidden" name="cancelall" value="1" />
|
|
<input type="hidden" name="allbranches" value="[% allbranches | html %]" />
|
|
<input type="hidden" name="tab" value="holdsover">
|
|
[% IF TransferWhenCancelAllWaitingHolds %]
|
|
<input type="submit" value="Cancel and Transfer all" />
|
|
[% ELSE %]
|
|
<input type="submit" value="Cancel all" />
|
|
[% END %]
|
|
</form>
|
|
[% UNLESS TransferWhenCancelAllWaitingHolds %]
|
|
Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref)
|
|
[% END %]
|
|
|
|
<table id="holdso">
|
|
<thead><tr>
|
|
<th class="title-string">Waiting since</th>
|
|
<th class="title-string">Date hold placed</th>
|
|
<th class="anti-the">Title</th>
|
|
<th>Patron</th>
|
|
<th>Home branch</th>
|
|
<th>Current location</th>
|
|
<th>Call number</th>
|
|
<th>Copy number</th>
|
|
<th>Enumeration</th>
|
|
<th>Action</th>
|
|
</tr></thead>
|
|
<tbody>[% FOREACH overloo IN overloop %]
|
|
<tr>
|
|
<td><span title="[% overloo.waitingdate | html %]">[% overloo.waitingdate | $KohaDates %]</span></td>
|
|
<td><span title="[% overloo.reservedate | html %]">[% overloo.reservedate | $KohaDates %]</span></td>
|
|
<td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title | html %]
|
|
[% FOREACH subtitl IN overloo.subtitle %] [% subtitl.subfield | html %][% END %]
|
|
</a>
|
|
[% UNLESS ( item_level_itypes ) %][% IF ( overloo.itemtype ) %] (<b>[% overloo.itemtype | html %]</b>)[% END %][% END %]
|
|
<br />Barcode: [% overloo.barcode | html %]
|
|
</td>
|
|
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overloo.patron.borrowernumber | html %]">[% overloo.patron.surname | html %], [% overloo.patron.firstname | html %]</a><br />[% overloo.patron.phone | html %]<br />
|
|
[% IF ( overloo.patron.first_valid_email_address ) %]<a href="mailto:[% overloo.patron.first_valid_email_address | html %]?subject=Reservation: [% overloo.title |url %]">
|
|
[% overloo.patron.first_valid_email_address | html %]</a>[% END %]
|
|
</td>
|
|
<td>[% Branches.GetName( overloo.homebranch ) | html %]</td>
|
|
<td>[% Branches.GetName( overloo.holdingbranch ) | html %]</td>
|
|
<td>[% overloo.itemcallnumber | html %]</td>
|
|
<td>[% overloo.copynumber | html %]</td>
|
|
<td>[% overloo.enumchron | html %]</td>
|
|
<td><form name="cancelReserve" action="waitingreserves.pl" method="post">
|
|
<input type="hidden" name="borrowernumber" value="[% overloo.borrowernum | html %]" />
|
|
<input type="hidden" name="itemnumber" value="[% overloo.itemnumber | html %]" />
|
|
<input type="hidden" name="fbr" value="[% overloo.holdingbranch | html %]" />
|
|
<input type="hidden" name="tbr" value="[% overloo.homebranch | html %]" />
|
|
<input type="hidden" name="tab" value="holdsover">
|
|
[% IF ( overloo.dotransfer ) %]
|
|
<input type="submit" value="Cancel hold and return to : [% Branches.GetName( overloo.homebranch ) | html %]" />
|
|
[% ELSE %]
|
|
<input type="submit" value="Cancel hold" />
|
|
[% END %]
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
[% END %]</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<div class="dialog message">No holds found.</div>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
[% IF Koha.Preference('CircSidebar') %]
|
|
</div>
|
|
<div class="yui-b noprint">
|
|
[% INCLUDE 'circ-nav.inc' %]
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('#resultlist').tabs();
|
|
$("th a").hide();
|
|
$("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
|
|
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
],
|
|
"sPaginationType": "four_button"
|
|
}));
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|