213 lines
8.1 KiB
Cheetah
213 lines
8.1 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Administration ›
|
|
<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" --> Printers › Modify printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE --> Printers › New printer<!-- /TMPL_IF --><!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="add_validate" --> Printers › Printer Added<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirm" --> Printers › Confirm Deletion of Printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirmed" --> Printers › Printer Deleted<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="else" -->Printers<!-- /TMPL_IF --></title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<!-- TMPL_IF NAME="add_form" --><script type="text/javascript">
|
|
//<![CDATA[
|
|
//
|
|
function isNotNull(f,noalert) {
|
|
if (f.value.length ==0) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
//
|
|
function toUC(f) {
|
|
var x=f.value.toUpperCase();
|
|
f.value=x;
|
|
return true;
|
|
}
|
|
//
|
|
function isNum(v,maybenull) {
|
|
var n = new Number(v.value);
|
|
if (isNaN(n)) {
|
|
return false;
|
|
}
|
|
if (maybenull==0 && v.value=="") {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
//
|
|
function isDate(f) {
|
|
var t = Date.parse(f.value);
|
|
if (isNaN(t)) {
|
|
return false;
|
|
}
|
|
}
|
|
//
|
|
function Check(f) {
|
|
var ok=1;
|
|
var _alertString="";
|
|
var alertString2;
|
|
if (f.printername.value.length==0) {
|
|
_alertString += "- printer name missing\n";
|
|
}
|
|
if (f.printqueue.value.length==0) {
|
|
_alertString += "- Queue missing\n";
|
|
}
|
|
if (_alertString.length==0) {
|
|
document.Aform.submit();
|
|
} else {
|
|
alertString2 = "Form not submitted because of the following problem(s)\n";
|
|
alertString2 += "------------------------------------------------------------------------------------\n\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
//]]>
|
|
</script>
|
|
<!-- /TMPL_IF -->
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="printers-admin-search.inc" -->
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Modify printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › New printer<!-- /TMPL_IF --><!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Printer Added<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirm" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Confirm Deletion of Printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirmed" --> <a href="/cgi-bin/koha/admin/printers.pl">Printers</a> › Printer Deleted<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="else" -->Printers<!-- /TMPL_IF --></div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<!-- TMPL_IF NAME="add_form" -->
|
|
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
<h1>Modify printer</h1>
|
|
<!-- TMPL_ELSE -->
|
|
<h1>New printer</h1>
|
|
<!-- /TMPL_IF -->
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
<input type="hidden" name="add" value="0" />
|
|
<!-- TMPL_ELSE -->
|
|
<input type="hidden" name="add" value="1" />
|
|
<!-- /TMPL_IF -->
|
|
<fieldset class="rows">
|
|
<ol> <!-- TMPL_IF NAME="searchfield" -->
|
|
<li>
|
|
<span class="label">Printer Name: </span>
|
|
<input type="hidden" name="printername" id="" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
|
|
</li>
|
|
<!-- TMPL_ELSE -->
|
|
<li>
|
|
<label for="printername">Printer Name: </label>
|
|
<input type="text" name="printername" id="printername" size="50" maxlength="50" />
|
|
</li>
|
|
<!-- /TMPL_IF -->
|
|
<li>
|
|
<label for="printqueue">Queue: </label>
|
|
<input type="text" name="printqueue" id="printqueue" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printqueue" -->" />
|
|
</li>
|
|
<li>
|
|
<label for="printtype">Type: </label>
|
|
<input type="text" name="printtype" id="printtype" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printtype" -->" />
|
|
</li></ol>
|
|
</fieldset>
|
|
<fieldset class="action"><input type="submit" value="Submit" onclick="Check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/admin/printers.pl">Cancel</a></fieldset>
|
|
</form>
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="add_validate" -->
|
|
<h3>Printer Added</h3>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<fieldset class="action"> <input type="submit" value="OK" /></fieldset>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirm" -->
|
|
<h3>Confirm Deletion of Printer <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>
|
|
<ul>
|
|
<li>
|
|
<strong>Printer: </strong>
|
|
<!-- TMPL_VAR NAME="searchfield" -->
|
|
</li>
|
|
<li>
|
|
<strong>Queue: </strong>
|
|
<!-- TMPL_VAR NAME="printqueue" -->
|
|
</li>
|
|
<li>
|
|
<strong>Type: </strong>
|
|
<!-- TMPL_VAR NAME="printtype" -->
|
|
</li>
|
|
</ul>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="hidden" name="op" value="delete_confirmed" />
|
|
<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
|
|
<input type="submit" value="Delete this Printer" />
|
|
</form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" value="Do not Delete" />
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirmed" -->
|
|
<h3>Printer Deleted</h3>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<fieldset class="action"><input type="submit" value="OK" /></fieldset>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="else" -->
|
|
|
|
<div id="toolbar">
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
// prepare DOM for YUI Toolbar
|
|
$(document).ready(function() {
|
|
new YAHOO.widget.Button("newprinter");
|
|
});
|
|
//]]>
|
|
</script>
|
|
<ul class="toolbar">
|
|
<li><a id="newprinter" href="/cgi-bin/koha/admin/printers.pl?op=add_form">New Printer</a></li>
|
|
</ul></div>
|
|
|
|
<h2>Printers</h2>
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="loop" --><table>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Queue</th>
|
|
<th>Type</th>
|
|
<th> </th>
|
|
</tr>
|
|
<!-- TMPL_LOOP NAME="loop" -->
|
|
<!-- TMPL_IF NAME="__odd__" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
|
|
<td><!-- TMPL_VAR NAME="printername" --></td>
|
|
<td><!-- TMPL_VAR NAME="printqueue" --></td>
|
|
<td><!-- TMPL_VAR NAME="printtype" --></td>
|
|
<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&searchfield=<!-- TMPL_VAR NAME="printername" -->">Edit</a> <a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&searchfield=<!-- TMPL_VAR NAME="printername" -->">Delete</a></td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table><!-- TMPL_ELSE --><div class="notice">No printers defined.</div><!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="offsetgtzero" -->
|
|
<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->"><< Previous</a>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="ltcount" -->
|
|
<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next >></a>
|
|
<!-- /TMPL_iF -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|