Koha/koha-tmpl/intranet-tmpl/default/es/parameters/categorie.tmpl
2003-06-03 21:44:41 +00:00

306 lines
8.7 KiB
Cheetah

<TMPL_INCLUDE NAME="parameters-top.inc">
<TMPL_IF NAME=add_form>
<script>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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>
<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>>
&nbsp;
</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>&nbsp;</td>
<td>
<INPUT type=button value='OK' onClick='Check(this.form)'>
</td>
</tr>
</table>
</form>
</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>
<TMPL_IF NAME=delete_confirm>
TOTAL : <TMPL_VAR NAME=categorycode> : <TMPL_VAR NAME=total><br>
<table border=0 cellspacing=0 cellpadding=5>
<tr bgcolor='#99cc33'>
<td background='/images/background-mem.gif'>
<b>Category code</b>
</td>
<td background='/images/background-mem.gif'>
<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 align=center><b>This record is used <TMPL_VAR NAME=total> times. Deletion not possible</b></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 align=center>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='<TMP_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 border=0 cellspacing=0 cellpadding=5>
<tr bgcolor='#99cc33'>
<td background='/images/background-mem.gif'><b>Category</b></td>
<td background='/images/background-mem.gif'><b>Description</b></td>
<td background='/images/background-mem.gif'><b>Enrolment</b></td>
<td background='/images/background-mem.gif'><b>Upper Age Limit</b></td>
<td background='/images/background-mem.gif'><b>Age Required</b></td>
<td background='/images/background-mem.gif'><b>Fine</b></td>
<td background='/images/background-mem.gif'><b>Bulk</b></td>
<td background='/images/background-mem.gif'><b>Fee</b></td>
<td background='/images/background-mem.gif'><b>Overdue</b></td>
<td background='/images/background-mem.gif'><b>Issue Limit</b></td>
<td background='/images/background-mem.gif'><b>Reserve</b></td>
<td background='/images/background-mem.gif'> </td>
<td background='/images/background-mem.gif'> </td>
</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=image src="/images/button-add-new.gif" WIDTH=188 HEIGHT=44 ALT="Add Category" BORDER=0 ></a><br>
</form></p>
</TMPL_IF>
<TMPL_INCLUDE NAME="parameters-bottom.inc">