de621bdaff
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
223 lines
8.6 KiB
Cheetah
223 lines
8.6 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Administration › Currencies & Exchange Rates ›
|
|
<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF --></title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
function toUC(f) {
|
|
var x=f.value.toUpperCase();
|
|
f.value=x;
|
|
return true;
|
|
}
|
|
function Check(f) {
|
|
var _alertString="";
|
|
var alertString2;
|
|
if (f.currency.value.length==0) {
|
|
_alertString += _("- Currency name missing") + "\n";
|
|
}
|
|
if (f.rate.value.length==0) {
|
|
_alertString += _("- Rate missing") + "\n";
|
|
}
|
|
if (f.symbol.value.length==0) {
|
|
_alertString += _("- Symbol missing") + "\n";
|
|
}
|
|
if (_alertString.length==0) {
|
|
document.Aform.submit();
|
|
} else {
|
|
alertString2 = _("Form not submitted because of the following problem(s)") + "\n";
|
|
alertString2 += "------------------------------------------------------------------------------------\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
|
|
$(document).ready(function() {
|
|
new YAHOO.widget.Button("newcurrency");
|
|
|
|
// prevents users to check active with a currency != 1
|
|
$("#rate").keyup(function() {
|
|
if ( $(this).val() == 1.0 ) {
|
|
$("#active").removeAttr('disabled');
|
|
} else {
|
|
$("#active").removeAttr('checked');
|
|
$("#active").attr('disabled','disabled');
|
|
}
|
|
});
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="currencies-admin-search.inc" -->
|
|
|
|
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/currency.pl">Currencies & Exchange Rates</a> › <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span>'<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
|
|
<!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF -->
|
|
</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<!-- TMPL_IF NAME="else" -->
|
|
<div id="toolbar">
|
|
<ul class="toolbar">
|
|
<li><a id="newcurrency" href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form">New Currency</a></li>
|
|
</ul></div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="add_form" -->
|
|
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
|
|
<input type="hidden" name="op" value="save" />
|
|
<fieldset class="rows">
|
|
<legend><!-- TMPL_IF NAME="searchfield" -->
|
|
Modify currency
|
|
<!-- TMPL_ELSE -->
|
|
New currency
|
|
<!-- /TMPL_IF --></legend>
|
|
<ol>
|
|
<li>
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
<span class="label">Currency: </span>
|
|
<input type="hidden" name="currency" id="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
|
|
<!-- TMPL_ELSE -->
|
|
<label for="currency">Currency: </label>
|
|
<input type="text" name="currency" id="currency" size="50" maxlength="50" onblur="toUC(this);" />
|
|
<!-- /TMPL_IF -->
|
|
</li>
|
|
<li>
|
|
<label for="rate">Rate: </label>
|
|
<input type="text" name="rate" id="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
|
|
</li>
|
|
<li>
|
|
<label for="symbol">Symbol: </label>
|
|
<input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="<!-- TMPL_VAR NAME="symbol" -->" />
|
|
</li>
|
|
|
|
<li>
|
|
<span class="label">Last Updated: </span><!-- TMPL_VAR NAME="timestamp" -->
|
|
</li>
|
|
<li>
|
|
<label for="active">Active: </label>
|
|
<!-- TMPL_IF NAME="active" -->
|
|
<input type="checkbox" id="active" name="active" value="1" checked="checked" />
|
|
<!-- TMPL_ELSE -->
|
|
<input type="checkbox" id="active" name="active" value="1" />
|
|
<!-- /TMPL_IF -->
|
|
</li>
|
|
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" value="Submit" onclick="Check(this.form)" />
|
|
<a href="/cgi-bin/koha/admin/currency.pl" class="cancel">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirm" -->
|
|
<!-- TMPL_IF NAME="totalgtzero" -->
|
|
<div class="dialog message">
|
|
<h3>Cannot Delete Currency <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
|
|
<p>This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</p>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" value="OK" class="approve" />
|
|
</form>
|
|
</div>
|
|
<!-- TMPL_ELSE -->
|
|
<div class="dialog alert">
|
|
<h3>Confirm Deletion of Currency <span class="ex">'<!-- TMPL_VAR NAME="searchfield" -->'</span></h3>
|
|
<table>
|
|
<tr><th>Currency</th>
|
|
<td><!-- TMPL_VAR NAME="searchfield" --></td>
|
|
</tr>
|
|
<tr><th>Rate</th>
|
|
<td><!-- TMPL_VAR NAME="rate" --></td>
|
|
</tr>
|
|
</table>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="hidden" name="op" value="delete_confirmed" />
|
|
<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
|
|
<input type="submit" class="approve" value="Delete this Currency" />
|
|
</form>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" class="deny" value="No, Do Not Delete" />
|
|
</form>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="delete_confirmed" -->
|
|
<div class="dialog message"><h3>Currency Deleted</h3>
|
|
<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
|
|
<input type="submit" class="approve" value="OK" />
|
|
</form></div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="else" -->
|
|
|
|
<h2>Currencies and Exchange Rates</h2>
|
|
|
|
<!-- TMPL_IF NAME="loop" --><!-- TMPL_UNLESS NAME="activecurrency" --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please edit one currency and mark it as active.</p></div><!-- /TMPL_UNLESS --><!-- /TMPL_IF -->
|
|
|
|
|
|
<!-- TMPL_IF NAME="searchfield" -->
|
|
You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Currency</th>
|
|
<th>Rate</th>
|
|
<th>Symbol</th>
|
|
<th>Last Updated</th>
|
|
<th>Active</th>
|
|
<th colspan="2">Actions </th>
|
|
</tr>
|
|
<!-- TMPL_LOOP NAME="loop" -->
|
|
<!-- TMPL_UNLESS NAME="__odd__" -->
|
|
<tr class="highlight">
|
|
<!-- TMPL_ELSE -->
|
|
<tr>
|
|
<!-- /TMPL_UNLESS -->
|
|
<td><!-- TMPL_VAR NAME="currency" --></td>
|
|
<td><!-- TMPL_VAR NAME="rate" --></td>
|
|
<td><!-- TMPL_VAR NAME="symbol" ESCAPE="HTML" --></td>
|
|
<td><!-- TMPL_VAR NAME="timestamp" --></td>
|
|
<td style="color:green;"><!-- TMPL_IF NAME="active" -->✓<!-- /TMPL_IF --></td>
|
|
<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&searchfield=<!-- TMPL_VAR NAME="currency" -->">Edit</a></td>
|
|
<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&searchfield=<!-- TMPL_VAR NAME="currency" -->">Delete</a></td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
<br />
|
|
|
|
<!-- TMPL_IF NAME="offsetgtzero" -->
|
|
<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->"><< Previous</a>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="ltcount" -->
|
|
<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next >></a>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="admin-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|