Koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-addbybiblionumber.tt
Chris Cormack 126d6247b2 Bug 6518 : Fixing XSS issues on opac
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-19 22:07:30 +12:00

84 lines
3.7 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Add to Your List
[% INCLUDE 'doc-head-close.inc' %]
<style type="text/css">
#custom-doc { width:34.62em;*width:33.78em;min-width:450px; margin:auto; margin-top: .4em;text-align:left; }
</style>
</head>
<body id="addtolist">
<div id="custom-doc" class="yui-t7">
<div id="useraddbybiblionumber" class="container">
[% IF ( authorized ) %]
[% UNLESS ( newshelf ) %]
[% IF ( multiple ) %]
<h1>Add [% total %] items to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>: [% ELSE %]a list:[% END %]</h1>
[% ELSE %]
<h1>Add to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>[% ELSE %]a list:[% END %]</h1>
[% END %]
<ul>
[% FOREACH biblio IN biblios %]
<li> <span class="title">[% biblio.title |html %]</span>
[% IF ( biblio.author ) %]<span class="author"> [% biblio.author %] </span>[% END %]
</li>
[% END %]
</ul>
[% IF ( existingshelves ) %]
<form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
<fieldset class="rows"><legend>Select a List</legend>
<ol><li> <label for="shelfnumber">Add to list:</label> <select name="shelfnumber" id="shelfnumber">
[% IF ( privatevirtualshelves ) %]<optgroup label="Private Lists">
[% FOREACH privatevirtualshelve IN privatevirtualshelves %]
<option value="[% privatevirtualshelve.shelfnumber %]">[% privatevirtualshelve.shelfname %]</option>
[% END %]
</optgroup>[% END %]
[% IF ( publicvirtualshelves ) %]<optgroup label="Public Lists">
[% FOREACH publicvirtualshelve IN publicvirtualshelves %]
<option value="[% publicvirtualshelve.shelfnumber %]">[% publicvirtualshelve.shelfname %]</option>
[% END %]
</optgroup>[% END %]
</select></li></ol>
[% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />[% END %]
<input type="hidden" name="modifyshelfcontents" value="1" /></fieldset>
<fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a></fieldset>
</form>
<p>...or...</p>
[% ELSE %]
[% IF ( singleshelf ) %]
<form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
[% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]">[% END %]
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
<input type="hidden" name="modifyshelfcontents" value="1" /></fieldset>
<fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a></fieldset>
</form>
[% END %]
[% END %]
[% END %]
[% UNLESS ( singleshelf ) %]<form name="f2" method="post" action="/cgi-bin/koha/opac-addbybiblionumber.pl">
<fieldset class="rows"> <legend>Add to a New List:</legend>
<ol><li>
<label for="newvirtualshelf">
List Name:
</label>
<input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
</li>
<li><label for="category">Category:</label>
<select name="category" id="category">
<option value="1">Private</option>
<option value="2">Public</option>
</select></li></ol></fieldset>
[% FOREACH biblio IN biblios %] <input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html%]" />[% END %]
<fieldset class="action"><input type="submit" value="Save" class="submit" /> <a class="close cancel" href="#">Cancel</a></fieldset>
</form>
[% END %]
[% ELSE %]
<p align="center">
This is not an open list.
Items cannot be added to it.
</p>
[% END %]
<p align="center">
<a href="#" class="close">Close this window.</a>
</p>
</div></div>
</body>
</html>