Owen Leonard
f35745d40e
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
297 lines
12 KiB
Cheetah
297 lines
12 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Administration › <!-- TMPL_IF NAME="else" -->z39.50 Servers<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="add_form" --> z39.50 Servers › <!-- TMPL_IF NAME="searchfield" -->Modify z39.50 Server <!-- TMPL_VAR NAME="searchfield" --><!-- TMPL_ELSE -->Add z39.50 Server<!-- /TMPL_IF --><!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirm" -->z39.50 Servers › Confirm Deletion<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="add_validate" -->z39.50 Servers › z39.50 Server Added<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirmed" -->z39.50 Servers › z39.50 Server Deleted<!-- /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.searchfield.value.length==0) {
|
|
_alertString += "- site name missing\n";
|
|
}
|
|
if (f.host.value.length==0) {
|
|
_alertString += "- host missing\n";
|
|
}
|
|
if (f.port.value.length==0) {
|
|
_alertString += "- port missing\n";
|
|
}
|
|
if (f.db.value.length==0) {
|
|
_alertString += "- database missing\n";
|
|
}
|
|
if (isNaN(f.port.value)) {
|
|
_alertString += "- port must be a number\n";
|
|
}
|
|
if (isNaN(f.rank.value)) {
|
|
_alertString += "- rank must be a number\n";
|
|
}
|
|
if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {
|
|
_alertString += "- checked must be 0 or 1\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="z3950-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="else" -->z39.50 Servers<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="add_form" --> <a href="/cgi-bin/koha/admin/z3950servers.pl">z39.50 Servers</a> › <!-- TMPL_IF NAME="searchfield" -->Modify z39.50 Server <!-- TMPL_VAR NAME="searchfield" --><!-- TMPL_ELSE -->Add z39.50 Server<!-- /TMPL_IF --><!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirm" --> <a href="/cgi-bin/koha/admin/z3950servers.pl">z39.50 Servers</a> › Confirm Deletion<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/admin/z3950servers.pl">z39.50 Servers</a> › z39.50 Server Added<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirmed" --> <a href="/cgi-bin/koha/admin/z3950servers.pl">z39.50 Servers</a> › z39.50 Server Deleted<!-- /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" -->
|
|
|
|
|
|
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="add_validate" />
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
<h1>Modify Z39.50 Server</h1>
|
|
<!-- TMPL_ELSE -->
|
|
<h1>Add Z39.50 Server</h1>
|
|
<!-- /TMPL_IF -->
|
|
<fieldset class="rows">
|
|
<ol><!-- TMPL_IF NAME="searchfield" -->
|
|
<li>
|
|
<span class="label">Z39.50 Server: </span>
|
|
|
|
<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
|
|
|
|
</li>
|
|
<!-- TMPL_ELSE -->
|
|
<li>
|
|
<label for="searchfield">Z39.50 Server: </label>
|
|
|
|
<input type="text" name="searchfield" id="searchfield" size="65" maxlength="100" onblur="toUC(this)" />
|
|
|
|
</li>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<li>
|
|
<label for="host">Hostname: </label>
|
|
|
|
<input type="text" name="host" id="host" size="30" value="<!-- TMPL_VAR NAME="host" -->" />
|
|
|
|
</li>
|
|
<li>
|
|
<label for="port">Port: </label>
|
|
|
|
<input type="text" name="port" id="port" size="5" value="<!-- TMPL_VAR NAME="port" -->" onblur="isNum(this)" />
|
|
|
|
</li>
|
|
<li>
|
|
<label for="db">Database: </label>
|
|
|
|
<input type="text" name="db" id="db" value="<!-- TMPL_VAR NAME="db" -->" />
|
|
|
|
</li>
|
|
<li>
|
|
<label for="userid">Userid: </label>
|
|
|
|
<input type="text" name="userid" id="userid" value="<!-- TMPL_VAR NAME="userid" -->" />
|
|
|
|
</li>
|
|
<li>
|
|
<label for="password">Password: </label>
|
|
|
|
<input type="text" name="password" id="password" value="<!-- TMPL_VAR NAME="password" -->" />
|
|
|
|
</li>
|
|
<li>
|
|
<label for="checked">Checked (searched by default): </label>
|
|
|
|
<input type="text" size="1" name="checked" id="checked" value="<!-- TMPL_VAR NAME="checked" -->" onblur="isNum(this)" /> </li>
|
|
<li>
|
|
<label for="rank">Rank (display order): </label>
|
|
|
|
<input type="text" name="rank" id="rank" size="4" value="<!-- TMPL_VAR NAME="rank" -->" onblur="isNum(this)" />
|
|
|
|
</li>
|
|
<li>
|
|
<label for="syntax">Syntax (z3950 can send<br />
|
|
records in various format. Choose one): </label>
|
|
|
|
<select name="syntax" id="syntax">
|
|
<option value="USMARC">USMARC</option>
|
|
<option value="UNIMARC">UNIMARC</option>
|
|
</select>
|
|
|
|
</li></ol>
|
|
</fieldset><input type="button" value="<!-- TMPL_IF NAME="searchfield" -->Update Z39.50 Server<!-- TMPL_ELSE -->Add Z39.50 Server<!-- /TMPL_IF -->" onclick="Check(this.form)" />
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="add_validate" -->
|
|
<h3>Z39.50 Server Added</h3>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" value="OK" />
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirm" -->
|
|
<!-- TMPL_VAR NAME="reqsel" -->
|
|
<h3>Confirm Deletion of Server <!-- TMPL_VAR NAME="searchfield" --></h3>
|
|
<ul>
|
|
<li>
|
|
<strong>Site: </strong>
|
|
|
|
<!-- TMPL_VAR NAME="searchfield" -->
|
|
|
|
</li>
|
|
<li>
|
|
<strong>Hostname: </strong>
|
|
<!-- TMPL_VAR NAME="host" -->
|
|
</li>
|
|
<li>
|
|
<strong>Port: </strong>
|
|
<!-- TMPL_VAR NAME="port" -->
|
|
</li>
|
|
<li>
|
|
<strong>Database: </strong>
|
|
<!-- TMPL_VAR NAME="db" -->
|
|
</li>
|
|
<li>
|
|
<strong>Userid: </strong>
|
|
<!-- TMPL_VAR NAME="userid" -->
|
|
</li>
|
|
<li>
|
|
<strong>Password: </strong>
|
|
<!-- TMPL_VAR NAME="password" -->
|
|
</li>
|
|
<li>
|
|
<strong>Checked: </strong>
|
|
<!-- TMPL_VAR NAME="checked" -->
|
|
</li>
|
|
<li>
|
|
<strong>Rank: </strong>
|
|
<!-- TMPL_VAR NAME="rank" -->
|
|
</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 Server" /></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>Z39.50 Server Deleted</h3>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" value="OK" />
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="else" -->
|
|
<h3>Z39.50 Servers Admininistration</h3>
|
|
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
You searched for <!-- TMPL_VAR NAME="searchfield" -->
|
|
<!-- /TMPL_IF -->
|
|
<table>
|
|
<tr>
|
|
<th>Site</th>
|
|
<th>Hostname/Port</th>
|
|
<th>Database</th>
|
|
<th>Userid</th>
|
|
<th>Password</th>
|
|
<th>Checked</th>
|
|
<th>Rank</th>
|
|
<th>Syntax</th>
|
|
<th colspan="2"> </th>
|
|
</tr>
|
|
<!-- TMPL_LOOP NAME="loop" -->
|
|
<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
|
|
<td><!-- TMPL_VAR NAME="name" --></td>
|
|
<td><!-- TMPL_VAR NAME="host" -->:<!-- TMPL_VAR NAME="port" --></td>
|
|
<td><!-- TMPL_VAR NAME="db" --></td>
|
|
<td><!-- TMPL_VAR NAME="userid" --></td>
|
|
<td><!-- TMPL_VAR NAME="password" --></td>
|
|
<td><!-- TMPL_VAR NAME="checked" --></td>
|
|
<td><!-- TMPL_VAR NAME="rank" --></td>
|
|
<td><!-- TMPL_VAR NAME="syntax" --></td>
|
|
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&searchfield=<!-- TMPL_VAR NAME="name" -->">Edit</a></td>
|
|
<td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&searchfield=<!-- TMPL_VAR NAME="name" -->">Delete</a></td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
|
|
<!-- TMPL_IF NAME="offsetgtzero" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
|
|
<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" />
|
|
<input type="submit" value="<< Prev">
|
|
</form><!-- /TMPL_IF -->
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="hidden" name="op" value="add_form" />
|
|
<input type="submit" value="Add z39.50 Server" />
|
|
</form>
|
|
<!-- TMPL_IF NAME="ltcount" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
|
|
<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" />
|
|
<input type="submit" value="Next >>" />
|
|
</form> <!-- /TMPL_iF -->
|
|
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|