143 lines
6.7 KiB
Cheetah
143 lines
6.7 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
|
|
<!-- TMPL_IF name=else -->
|
|
<h1>Bookfund admin</h1>
|
|
<form action=<!-- TMPL_VAR name=scriptname --> method=post>
|
|
<input type=text name=searchfield value=""><input type=reset name=reset value="clr"></form>
|
|
<!-- TMPL_IF name=search -->
|
|
<br>You Searched for <b><!-- TMPL_VAR name=searchfield --><b><p><br>
|
|
<!-- /TMPL_IF -->
|
|
<table border=0 cellspacing=0 cellpadding=2 width="80%">
|
|
<tr valign=top bgcolor=#99cc33>
|
|
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b>Book fund</b></td>
|
|
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b>Name</b></td>
|
|
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b>Edit</b></td>
|
|
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b>Delete</b></td>
|
|
</tr>
|
|
<!-- TMPL_LOOP name="bookfund" -->
|
|
<tr valign=top bgcolor="ffffcc">
|
|
<td><!-- TMPL_VAR name="bookfundid" --></td>
|
|
<td><!-- TMPL_VAR name="bookfundname" --></td>
|
|
<td><a href="<!-- TMPL_VAR name="action" -->?op=add_form&bookfundid=<!-- TMPL_VAR name="bookfundid" --> "><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
|
<td><a href="<!-- TMPL_VAR name="action" -->?op=delete_confirm&bookfundid=<!-- TMPL_VAR name="bookfundid" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
|
</tr>
|
|
<tr valign=top bgcolor=#99cc33>
|
|
<td bgcolor="#FFFFFF"> </td>
|
|
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b>Budget</b></td>
|
|
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><a href="aqbudget.pl?op=add_form&bookfundid=<!-- TMPL_VAR name="bookfundid" -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/filenew.png" ALT="Add budget" border=0></a></td>
|
|
<td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"></td>
|
|
</tr>
|
|
<!-- TMPL_LOOP name="budget" -->
|
|
<tr valign=top>
|
|
<td> </td>
|
|
<td>
|
|
<!-- TMPL_VAR name="startdate" --> - <!-- TMPL_VAR name="enddate" --> : <b><!-- TMPL_VAR name="budgetamount" --></b>
|
|
</td>
|
|
<td><a href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&aqbudgetid=<!-- TMPL_VAR name="aqbudgetid" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
|
<td><a href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&aqbudgetid=<!-- TMPL_VAR name="aqbudgetid" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0></a></td>
|
|
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<form action='<!-- TMPL_VAR name=scriptname -->' method=post>
|
|
<input type=hidden name=op value=add_form>
|
|
<br><input type=submit class="button" value="Add Bookfund" title="Add Bookfund" ALT="Add Bookfund"><br>
|
|
<br></form><br clear=all>
|
|
<p> </p>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- 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.bookfundid.value.length==0) {
|
|
_alertString += "- bookfundid missing\n";
|
|
}
|
|
if (f.bookfundname.value.length==0) {
|
|
_alertString += "- bookfundname 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>
|
|
<h1><!-- TMPL_VAR name="header" --></h1>
|
|
<form action='<!-- TMPL_VAR name="action" -->' name=Aform method=post>
|
|
<input type=hidden name=op value='add_validate'>
|
|
<input type=hidden name=checked value=0>
|
|
<table>
|
|
<!-- TMPL_IF name="add_or_modify" -->
|
|
<tr><td>Book fund</td><td><input type=hidden name=bookfundid value=<!-- TMPL_VAR name="bookfundid" -->><!-- TMPL_VAR name="bookfundid" --></td></tr>
|
|
<!-- TMPL_ELSE -->
|
|
<tr><td>Book fund</td><td><input type=text name=bookfundid size=5 maxlength=5 onBlur=toUC(this)></td></tr>
|
|
<!-- /TMPL_IF -->
|
|
<tr><td>Name</td><td><input type=text name=bookfundname size=40 maxlength=80 value='<!-- TMPL_VAR name="bookfundname" escape=HTML -->'> </td></tr>
|
|
<tr><td> </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="action" -->' method=post>
|
|
<input type=submit value=OK>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="delete_confirm" -->
|
|
<table border=0 cellspacing=0 cellpadding=5>
|
|
<tr valign=top bgcolor=#99cc33><td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b>Book fund</b></td><td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif"><b><!-- TMPL_VAR name="bookfundid" --></b></td></tr>
|
|
<form action='<!-- TMPL_VAR name="action" -->' method=post><input type=hidden name=op value=delete_confirmed><input type=hidden name=bookfundid value='<!-- TMPL_VAR name="bookfundid" -->'>
|
|
<tr><td>Name</td><td><!-- TMPL_VAR name="bookfundname" --></td></tr>
|
|
<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="action" -->' method=post><input type=submit value=NO></form></td></tr><br clear=all>
|
|
<p> </p>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="delete_confirmed" -->
|
|
Data deleted
|
|
<form action='<!-- TMPL_VAR name="action" -->' method=post>
|
|
<input type=submit value=OK>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->
|