5ff7fcffa4
- updating templates to have tmpl_process3.pl running without any errors - adding a drupal-like css for prog templates (with 3 small images) - fixing some bugs in circulation & other scripts - updating french translation - fixing some typos in templates
310 lines
12 KiB
Cheetah
310 lines
12 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › <!-- TMPL_IF NAME="categorycode" -->Modify category<!-- TMPL_ELSE -->Add category<!-- /TMPL_IF --></title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
|
|
<!-- TMPL_INCLUDE NAME="menus.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
|
|
|
|
<!-- TMPL_IF NAME="add_form" -->
|
|
<script language="JavaScript" type="text/javascript">
|
|
//
|
|
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.categorycode.value.length==0) {
|
|
_alertString += "- categorycode missing\n";
|
|
}
|
|
// alert(window.document.Aform.description.value);
|
|
if (!(isNotNull(window.document.Aform.description,1))) {
|
|
_alertString += "- description missing\n";
|
|
}
|
|
if (!isNum(f.upperagelimit,0)) {
|
|
_alertString += "- upperagelimit is not a number\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;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<!-- TMPL_IF NAME="categorycode" -->
|
|
<h1>Modify category</h1>
|
|
<!-- TMPL_ELSE -->
|
|
<h1>Add category</h1>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="add_validate">
|
|
<input type="hidden" name="checked" value=0>
|
|
|
|
<table>
|
|
<!-- TMPL_IF NAME="categorycode" -->
|
|
<tr>
|
|
<td>Category code</td>
|
|
<td>
|
|
<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
|
|
</td>
|
|
</tr>
|
|
<!-- TMPL_ELSE -->
|
|
<tr>
|
|
<td>Category code</td>
|
|
<td>
|
|
<input type="text" name="categorycode" size="3" maxlength="2" onblur="toUC(this)">
|
|
</td>
|
|
</tr>
|
|
<!-- /TMPL_IF -->
|
|
<tr>
|
|
<td>Description</td>
|
|
<td>
|
|
<input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" -->">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Enrolment period</td>
|
|
<td>
|
|
<input type="text" name="enrolmentperiod" value="<!-- TMPL_VAR NAME="enrolmentperiod" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Upperage limit</td>
|
|
<td>
|
|
<input type="text" name="upperagelimit" value="<!-- TMPL_VAR NAME="upperagelimit" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Age Required</td>
|
|
<td>
|
|
<input type="text" name="dateofbirthrequired" value="<!-- TMPL_VAR NAME="dateofbirthrequired" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Fine type</td>
|
|
<td>
|
|
<input type="text" name="finetype" size="30" maxlength="30" value="<!-- TMPL_VAR NAME="finetype" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Bulk</td>
|
|
<td>
|
|
<input type="text" name="bulk" value="<!-- TMPL_VAR NAME="bulk" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Enrolment fee</td>
|
|
<td>
|
|
<input type="text" name="enrolmentfee" value="<!-- TMPL_VAR NAME="enrolmentfee" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Overdue notice required</td>
|
|
<td>
|
|
<input type="text" name="overduenoticerequired" value="<!-- TMPL_VAR NAME="overduenoticerequired" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Issue limit</td>
|
|
<td>
|
|
<input type="text" name="issuelimit" value="<!-- TMPL_VAR NAME="issuelimit" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Reserve fee</td>
|
|
<td>
|
|
<input type="text" name="reservefee" value="<!-- TMPL_VAR NAME="reservefee" -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td>
|
|
<input type="button" value="OK" onclick="Check(this.form)">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="add_validate" -->
|
|
Data recorded
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" value="OK">
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
TOTAL : <!-- TMPL_VAR NAME="categorycode" --> : <!-- TMPL_VAR NAME="total" --><br />
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
Category code
|
|
</td>
|
|
<td>
|
|
<!-- TMPL_VAR NAME="categorycode" -->
|
|
</td>
|
|
</tr>
|
|
<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
|
|
<input type="hidden" name="op" value="delete_confirmed">
|
|
<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
|
|
<tr>
|
|
<td>Description</td>
|
|
<td><!-- TMPL_VAR NAME="description" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Enrolment period</td>
|
|
<td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Upperage limit</td>
|
|
<td><!-- TMPL_VAR NAME="upperagelimit" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Age Required</td>
|
|
<td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Fine type</td>
|
|
<td><!-- TMPL_VAR NAME="finetype" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Bulk</td>
|
|
<td><!-- TMPL_VAR NAME="bulk" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Enrolment fee</td>
|
|
<td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Overdue notice required</td>
|
|
<td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Issue limit</td>
|
|
<td><!-- TMPL_VAR NAME="issuelimit" --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Reserve fee</td>
|
|
<td><!-- TMPL_VAR NAME="reservefee" --></td>
|
|
</tr>
|
|
<!-- TMPL_IF NAME="totalgtzero" -->
|
|
<tr>
|
|
<td colspan="2">This record is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=2>
|
|
</form><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" value="OK">
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<!-- TMPL_ELSE -->
|
|
<tr>
|
|
<td colspan="2">CONFIRM DELETION</td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="submit" value="YES"></form></td>
|
|
<td><form action="<!-- TMPL_VAR NAME=script_name -->" method="post"><input type="submit" value="NO"></form></td>
|
|
</tr>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME=delete_confirmed -->
|
|
data deleted
|
|
<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
|
|
<input type="submit" value="OK">
|
|
</form>
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="else" -->
|
|
<h2>Category admin</h2>
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
You Searched for <!-- TMPL_VAR NAME="searchfield" -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="text" name="description" value="<!-- TMPL_VAR NAME=searchfield -->">
|
|
<input type="reset" name="reset" value="clr">
|
|
</form>
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Category</th>
|
|
<th>Description</th>
|
|
<th>Enrolment</th>
|
|
<th>Upper Age Limit</th>
|
|
<th>Age Required</th>
|
|
<th>Fine</th>
|
|
<th>Bulk</th>
|
|
<th>Fee</th>
|
|
<th>Overdue</th>
|
|
<th>Issue Limit</th>
|
|
<th>Reserve</th>
|
|
<th> </th>
|
|
<th> </th>
|
|
</tr>
|
|
<!-- TMPL_LOOP NAME="loop" -->
|
|
<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
|
|
<td><!-- TMPL_VAR NAME="categorycode" --></td>
|
|
<td><!-- TMPL_VAR NAME="description" --></td>
|
|
<td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
|
|
<td><!-- TMPL_VAR NAME="upperagelimit" --></td>
|
|
<td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
|
|
<td><!-- TMPL_VAR NAME="finetype" --></td>
|
|
<td><!-- TMPL_VAR NAME="bulk" --></td>
|
|
<td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
|
|
<td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
|
|
<td><!-- TMPL_VAR NAME="issuelimit" --></td>
|
|
<td><!-- TMPL_VAR NAME="reservefee" --></td>
|
|
<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit</a></td>
|
|
<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Delete</a></td></tr>
|
|
<!-- /TMPL_LOOP -->
|
|
|
|
</table>
|
|
<p><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="hidden" name="op" value="add_form">
|
|
<input type="submit" value="Add Category"></a><br />
|
|
</form></p>
|
|
<!-- /TMPL_IF -->
|
|
|
|
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
|
|
|
|
|
|
|
|