Koha/koha-tmpl/intranet-tmpl/npl/en/parameters/categorie.tmpl
2005-01-20 20:24:08 +00:00

186 lines
9 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF NAME=add_form --><!-- TMPL_IF NAME="categorycode" -->Modify category '<!-- TMPL_VAR NAME="categorycode" -->'<!-- TMPL_ELSE -->Add category<!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="add_validate" -->Data recorded<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Category '<!-- TMPL_VAR NAME="categorycode" -->'<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirmed" -->Category Deleted<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="else" -->Patron Categories<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
<div id="main">
<!-- 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;
alert(alertString2);
}
}
</script>
<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" />
<!-- TMPL_IF NAME="categorycode" -->
<h1>Modify category <!-- TMPL_VAR NAME="categorycode" --></h1>
<!-- TMPL_ELSE -->
<h1>Add category</h1>
<!-- /TMPL_IF -->
<div class="form"><table>
<!-- TMPL_IF NAME="categorycode" -->
<tr><th>Category code</th><td><!-- TMPL_VAR NAME="categorycode" -->
<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->" /></td></tr>
<!-- TMPL_ELSE -->
<tr><th>Category code</th><td><input type="text" name="categorycode" size="3" maxlength="2" onblur="toUC(this)" /></td></tr>
<!-- /TMPL_IF -->
<tr><th>Description</th><td><input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME=description -->" /></td></tr>
<tr><th>Enrolment period</th><td><input type="text" name="enrolmentperiod" size="2" maxlength="2" value="<!-- TMPL_VAR NAME=enrolmentperiod -->" /> years</td></tr>
<tr><th>Upperage limit</th><td><input type="text" name="upperagelimit" size="3" maxlength="3" value="<!-- TMPL_VAR NAME=upperagelimit -->" /> years</td></tr>
<tr><th>Age Required</th><td><input type="text" name="dateofbirthrequired" value="<!-- TMPL_VAR NAME=dateofbirthrequired -->" size="3" maxlength="3" /> years</td></tr>
<tr><th>Enrollment fee</th><td>$<input type="text" name="enrolmentfee" value="<!-- TMPL_VAR NAME=enrolmentfee -->" /></td></tr>
<tr><th>Overdue notice required</th><td><input type="text" name="overduenoticerequired" value="<!-- TMPL_VAR NAME="overduenoticerequired" -->" /></td></tr>
<tr><th>Reserve fee</th><td>$<input type="text" name="reservefee" value="<!-- TMPL_VAR NAME="reservefee" -->" /></td></tr>
</table></div>
<p> <input type="button" class="submit" value="<!-- TMPL_IF NAME="categorycode" -->Update Category<!-- TMPL_ELSE -->Add Category<!-- /TMPL_IF -->" onclick="Check(this.form);" /> <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" /></p>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="add_validate" -->
<h3>Data recorded</h3><div class="form">
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="submit" value="OK" class="submit" />
</form>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirm" -->
<!-- TMPL_IF NAME="totalgtzero" --><h3>Cagegory <!-- TMPL_VAR NAME="categorycode" --> is in use. Deletion not possible!</h3><!-- TMPL_ELSE --><h2>Confirm Deletion of Category <!-- TMPL_VAR NAME="categorycode" --></h2><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="totalgtzero" --><div class="error">This category is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</div><!-- /TMPL_IF -->
<div class="compact"><table>
<tr><th>Category code</th><td><!-- TMPL_VAR NAME="categorycode" --></td></tr>
<tr><th>Description</th><td><!-- TMPL_VAR NAME="description" --></td></tr>
<tr><th>Enrolment period</th><td><!-- TMPL_VAR NAME="enrolmentperiod" --> years</td></tr>
<tr><th>Upperage limit</th><td><!-- TMPL_VAR NAME="upperagelimit" --> years</td></tr>
<tr><th>Age Required</th><td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td></tr>
<tr><th>Enrolment fee</th><td>$<!-- TMPL_VAR NAME="enrolmentfee" --></td></tr>
<tr><th>Overdue notice required</th><td><!-- TMPL_IF NAME="overduenoticerequired" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td></tr>
<tr><th>Reserve fee</th><td>$<!-- TMPL_VAR NAME="reservefee" --></td></tr>
</table></div>
<!-- TMPL_IF NAME="totalgtzero" -->
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" class="submit" /></form>
<!-- TMPL_ELSE -->
<div class="tabitem"><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" -->" /> <input type="submit" value="Delete this Category" class="cancel" /></form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="Do Not Delete" /></form></div>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirmed" -->
<h3>Category Deleted</h3>
<div class="form">
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="submit" value="OK" class="submit" />
</form></div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="else" -->
<h2>Patron Category Administration</h2>
<!-- TMPL_IF NAME="searchfield" -->
<div id="results">You Searched for <span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span></div>
<!-- /TMPL_IF -->
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
<input type="submit" name="search" class="submit" value="Find" />
</form>
<div class="data"><table>
<tr>
<th scope="col">Category</th>
<th scope="col">Description</th>
<th scope="col">Enrollment Period</th>
<th scope="col">Upper Age Limit</th>
<th scope="col">Age Required</th>
<th scope="col">Fine</th>
<th scope="col">Enrollment Fee</th>
<th scope="col">Overdue</th>
<th scope="col">Issue Limit</th>
<th scope="col">Reservation Fee</th>
<th scope="col" colspan="2">&nbsp; </th>
</tr>
<!-- TMPL_LOOP NAME="loop" -->
<tr<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPl_IF -->>
<td><a href="<!-- TMPL_VAR NAME=script_name -->?op=add_form&amp;categorycode=<!-- TMPL_VAR NAME=categorycode -->"><!-- TMPL_VAR NAME="categorycode" --></a></td>
<td><!-- TMPL_VAR NAME="description" --></td>
<td><!-- TMPL_VAR NAME="enrolmentperiod" --> years</td>
<td><!-- TMPL_VAR NAME="upperagelimit" --> years</td>
<td><!-- TMPL_VAR NAME="dateofbirthrequired" --> years</td>
<td><!-- TMPL_VAR NAME="finetype" --></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 class="edit" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit</a></td>
<td><a class="delete" href="<!-- TMPL_VAR NAME=script_name -->?op=delete_confirm&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Delete</a></td>
</tr>
<!-- /TMPL_LOOP -->
</table></div><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
<input type="hidden" name="op" value="add_form" />
<input type="submit" value="Add Category" class="submit" />
</form>
<!-- /TMPL_IF -->
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->