Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tmpl
Joe Atzberger 5d15edd869 Standalone branch selection
selectbranchprinter now posts to itself to set the branch.  That also means that
other pages can set the branch by linking to selectbranchprinter like:
    /cgi-bin/koha/circ/selectbranchprinter.pl?branch=MAIN

We use HTTP_REFERER to allow the user to continue back to wherever they linked from,
defaulting to circulation.pl (the former POST target).

Note that all "branchprinter" functions are basically useless as the data is not
properly handled in the session storage.  Chris C. expects this to be addressed
with later patches for HLT.  There appear to be no 3.0 users of this intended
functionality yet.

Includes squashed patch to fix tmpl and to automatically redirect if there are no
POST params to be recycled.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2009-06-05 17:33:17 -05:00

94 lines
3.6 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Circulation &rsaquo; Set Library</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<style type="text/css">
.noshow {display: none;}
</style>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="circ-search.inc" -->
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
&rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
&rsaquo; <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set Library</a>
</div>
<div id="doc" class="yui-t7">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_IF NAME="updated" -->
<h2>Update Succeeded</h2>
Updated:<ul>
<!-- TMPL_LOOP NAME="updated" -->
<!-- TMPL_IF NAME="updated_branch" -->
<li>Library: <!-- TMPL_VAR NAME="old_branch" DEFAULT="?" --> &rArr; <!-- TMPL_VAR NAME="LoginBranchcode" DEFAULT="?" --></li>
<!-- TMPL_ELSIF NAME="updated_printer" -->
<!-- FIXME: <li>Printer: <!-- TMPL_VAR NAME="old_printer" DEFAULT="?" --> &rArr; <!-- TMPL_VAR NAME="new_printer" DEFAULT="?" --></li> -->
<!-- TMPL_ELSE -->
<li>ERROR - unknown</li>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</ul>
<form method="post" action="<!-- TMPL_VAR NAME='referer' ESCAPE='HTML' DEFAULT='/cgi-bin/koha/circ/circulation.pl' -->">
<div class="noshow">
<!-- TMPL_LOOP NAME="recycle_loop" -->
<input name="<!-- TMPL_VAR NAME="param" -->" value="<!-- TMPL_VAR NAME="value" ESCAPE='HTML' -->" />
<!-- /TMPL_LOOP -->
</div>
<button type="submit">Continue</button>
</form>
<!-- TMPL_ELSE -->
<form method="post" action="selectbranchprinter.pl">
<fieldset class="rows">
<legend>Set Library</legend>
<ol>
<!-- TMPL_IF NAME="singleBranchMode" -->
<li>Single Branch mode is ON.</li>
<!-- TMPL_ELSE -->
<li><label for="branch">Choose library:</label>
<select name="branch" id="branch">
<!-- TMPL_LOOP Name="branchloop" -->
<!-- TMPL_IF NAME="selected" -->
<option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select></li>
<!-- /TMPL_IF -->
<!-- TMPL_IF Name="printerloop" -->
<li><label for="printer">Choose a network printer:</label>
<select name="printer" id="printer">
<!-- TMPL_LOOP Name="printerloop" -->
<!-- TMPL_IF NAME="selected" -->
<option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="name" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="name" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select></li>
<!-- /TMPL_IF --></ol>
</fieldset>
<fieldset class="action"><input type="submit" value="Submit" /></fieldset>
<div class="noshow">
<!-- TMPL_LOOP Name="recycle_loop" -->
<input name="<!-- TMPL_VAR NAME="param" -->" value="<!-- TMPL_VAR NAME="value" ESCAPE='HTML' -->" />
<!-- /TMPL_LOOP -->
<input type="hidden" name="oldreferer" value="<!-- TMPL_VAR NAME='referer' ESCAPE='HTML' DEFAULT='/cgi-bin/koha/circ/circulation.pl' -->" />
</div>
</form>
<!-- /updated -->
<!-- /TMPL_IF -->
</div>
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->