Koha/koha-tmpl/intranet-tmpl/prog/en/admin/aqbookfund.tmpl
2006-09-11 17:41:54 +00:00

160 lines
6.9 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF name="else" -->Book Funds<!-- /TMPL_IF -->
<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="header" --><!-- /TMPL_IF -->
<!-- TMPL_IF name="add_validate" -->Data Recorded<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Fund '<!-- TMPL_VAR name="bookfundname" -->'<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="menus.inc" -->
<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
<!-- TMPL_IF name="else" -->
<h1>Book Fund Administration</h1>
<!-- TMPL_IF NAME="bookfund" --><form action="<!-- TMPL_VAR name=scriptname -->" method="post">
<input type="text" name="searchfield" value="" /> <input type="submit" name="search" value="Search" class="submit" /></form>
<!-- TMPL_IF name="search" -->
<div id="results">You Searched for <span class="ex"><!-- TMPL_VAR name="searchfield" --></span></div>
<!-- /TMPL_IF -->
<table>
<tr>
<th>Book Fund</th>
<th>Name</th>
<th>Branch</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<!-- TMPL_LOOP name="bookfund" -->
<tr>
<td><a href="<!-- TMPL_VAR name="action" -->?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" --> "><!-- TMPL_VAR name="bookfundid" --></a></td>
<td><!-- TMPL_VAR name="bookfundname" --></td>
<td><!--TMPL_VAR Name="branchname"--></td>
<td><form action="<!-- TMPL_VAR name="action" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><input type="submit" class="submit" value="Edit" /></form></td>
<td><form action="<!-- TMPL_VAR name="action" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><input type="submit" class="delete" value="Delete" /></form></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><b>Budget</b></td>
<td>Branch</td>
<td><form action="aqbudget.pl" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><input type="submit" class="submit" value="Add Budget" /></form></td>
<td></td>
</tr>
<!-- TMPL_LOOP name="budget" -->
<tr>
<td>&nbsp;</td>
<td>
<!-- TMPL_VAR name="startdate" --> - <!-- TMPL_VAR name="enddate" --> : <b><!-- TMPL_VAR name="budgetamount" --></b>
</td>
<td>
<!--TMPL_IF Name="branchcode"-->
<!--TMPL_VAR Name="branchcode"-->
<!--TMPL_ELSE -->
&nbsp;
<!--/TMPL_IF-->
</td>
<td><form action="/cgi-bin/koha/admin/aqbudget.pl" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR name="aqbudgetid" -->" /><input type="submit" class="submit" value="Edit" /></form></td>
<td><form action="/cgi-bin/koha/admin/aqbudget.pl" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR name="aqbudgetid" -->" /><input type="submit" class="delete" value="Delete" /></form></td>
</tr>
<!-- /TMPL_LOOP -->
<!-- /TMPL_LOOP -->
</table><!-- /TMPL_IF -->
<form action="<!-- TMPL_VAR name="scriptname" -->" method="post">
<p><input type="hidden" name="op" value="add_form" /></p>
<input type="submit" value="Add bookfund" class="submit" /></form>
<!-- /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>
<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" />
<div class="data">
<table>
<caption><!-- TMPL_VAR name="header" --></caption>
<!-- TMPL_IF name="add_or_modify" -->
<tr><th>Book fund</th><td><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><!-- TMPL_VAR name="bookfundid" --></td></tr>
<!-- TMPL_ELSE -->
<tr><th>Book fund</th><td><input type="text" name="bookfundid" size="5" maxlength="5" onblur="toUC(this)" /></td></tr>
<!-- /TMPL_IF -->
<tr><th>Name</th><td><input type="text" name="bookfundname" size="40" maxlength="80" value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->" /></td></tr>
<tr><th><label>Branch</label></th><td><!-- TMPL_VAR NAME="CGIbranch"--> Select one if budget is branch-specific, otherwise, leave it blank.</td></tr>
</table>
</div>
<p><input type="button" value="<!-- TMPL_VAR name="header" -->" onclick="Check(this.form); return false;" class="submit" /> <input type="submit" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR name="action" -->'; return false;" /></p>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="add_validate" -->
<h3>Data Recorded</h3>
<form action="<!-- TMPL_VAR name="action" -->" method="post">
<input type="submit" value="OK" class="submit" />
</form></td></tr></table>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" -->
<h3>Confirm Deletion of Fund <em><!-- TMPL_VAR name="bookfundid" --></em></h3>
<div class="data"><table>
<tr><th>Book fund</th><td><!-- TMPL_VAR name="bookfundid" --></td></tr>
<tr><th>Name</th><td><!-- TMPL_VAR name="bookfundname" --></td></tr><tr><th>Group</th><td><!-- TMPL_VAR name="bookfundgroup" --></td></tr>
</table></div><div class="tabitem"><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" -->" /><input type="submit" value="Delete this Fund" class="cancel" /></form> <form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="submit" value="Do not Delete" class="submit" /></form></div>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirmed" -->
<h3>Data Deleted</h3>
<div class="form"><form action="<!-- TMPL_VAR name="action" -->" method="post">
<input type="submit" value="OK" class="submit" /></form></div>
<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->