[% PROCESS "opac/parts/misc_util.tt2";
PROCESS "opac/parts/hold_error_messages.tt2";
PROCESS "opac/parts/metarecord_hold_filters.tt2";
%]
[% l('Place Hold') %]
[% some_holds_allowed = -1 %]
[% FOR hdata IN ctx.hold_data;
attrs = {marc_xml => hdata.marc_xml};
PROCESS get_marc_attrs args=attrs;
this_hold_disallowed = 0;
IF CGI.param('hold_type') == 'M';
IF hdata.metarecord_filters.formats.size == 0;
this_hold_disallowed = 1;
# if this is the first hold and it's disallowed,
# assume all holds are, until we proven otherwise
SET some_holds_allowed = 0 IF some_holds_allowed == -1;
ELSE; some_holds_allowed = 1; END;
END %]
[% IF loop.first %]