307 lines
10 KiB
Cheetah
307 lines
10 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
|
|
<div id="mainbloc">
|
|
<!-- TMPL_IF NAME=add_form -->
|
|
<script>
|
|
function _(s) { return s } // dummy function for gettext
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
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 += "\n- " + _("Brak kodu kategorii");
|
|
}
|
|
// alert(window.document.Aform.description.value);
|
|
if (!(isNotNull(window.document.Aform.description,1))) {
|
|
_alertString += "\n- " + _("brak opisu");
|
|
}
|
|
if (!isNum(f.upperagelimit,0)) {
|
|
_alertString += "\n- " + _("Górna granica wieku nie jest cyfrą");
|
|
}
|
|
if (_alertString.length==0) {
|
|
document.Aform.submit();
|
|
} else {
|
|
alertString2 = _("Formularz odrzucono z powodu następujących błędów(u)");
|
|
alertString2 += "\n------------------------------------------------------------------------------------\n";
|
|
alertString2 += _alertString;
|
|
alert(alertString2);
|
|
}
|
|
}
|
|
</SCRIPT>
|
|
|
|
<!-- TMPL_IF NAME=categorycode -->
|
|
<h1>Zmieniaj kategorię</h1>
|
|
<!-- TMPL_ELSE -->
|
|
<h1>Dodaj kategorię</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>Kod Kategorii</td>
|
|
<td>
|
|
<b><!-- TMPL_VAR NAME=categorycode --></b>
|
|
<input type=hidden name=categorycode value=<!-- TMPL_VAR NAME=categorycode -->>
|
|
</td>
|
|
</tr>
|
|
<!-- TMPL_ELSE -->
|
|
<tr>
|
|
<td>Kod Kategorii</td>
|
|
<td>
|
|
<input type=text name=categorycode size=3 maxlength=2 onBlur=toUC(this)>
|
|
</td>
|
|
</tr>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<tr>
|
|
<td>Wyjaśnienie</td>
|
|
<td>
|
|
<input type=text name=description size=40 maxlength=80 value="<!-- TMPL_VAR NAME=description escape=HTML -->">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Okres wpisu</td>
|
|
<td>
|
|
<input type=text name=enrolmentperiod size=3 maxlength=2 value="<!-- TMPL_VAR NAME=enrolmentperiod -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Górna granica wieku</td>
|
|
<td>
|
|
<input type=text name=upperagelimit size=3 maxlength=3 value="<!-- TMPL_VAR NAME=upperagelimit -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Wymagany Wiek</td>
|
|
<td>
|
|
<input type=text name=dateofbirthrequired value="<!-- TMPL_VAR NAME=dateofbirthrequired -->" size=3 maxlength=2>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Opłata wpisowa</td>
|
|
<td>
|
|
<input type=text name=enrolmentfee value="<!-- TMPL_VAR NAME=enrolmentfee -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Potrzebne upomnienie o zaległości</td>
|
|
<td>
|
|
<select name="overduenoticerequired">
|
|
<option <!-- TMPL_UNLESS name="overduenoticerequired" -->selected<!-- /TMPL_UNLESS --> value="0">Nie</option>
|
|
<option <!-- TMPL_IF name="overduenoticerequired" -->selected<!-- /TMPL_IF --> value="1">Tak</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Limit wypożyczeń</td>
|
|
<td>
|
|
<input type=text name=issuelimit size=2 maxlength=2 value="<!-- TMPL_VAR NAME=issuelimit -->">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Opłata rezerwacyjna</td>
|
|
<td>
|
|
<input type=text name=reservefee value="<!-- TMPL_VAR NAME=reservefee -->">
|
|
</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 -->
|
|
Dane zapisane
|
|
<form action=<!-- TMPL_VAR NAME=script_name --> method=post>
|
|
<input type=submit value=OK>
|
|
</form>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME=delete_confirm -->
|
|
KWOTA ŁĄCZNA: <!-- 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>Kod Kategorii</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>Wyjaśnienie</td>
|
|
<td><!-- TMPL_VAR NAME=description --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Okres wpisu</td>
|
|
<td><!-- TMPL_VAR NAME=enrolmentperiod --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Górna granica wieku</td>
|
|
<td><!-- TMPL_VAR NAME=upperagelimit --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Wymagany Wiek</td>
|
|
<td><!-- TMPL_VAR NAME=dateofbirthrequired --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Typ kary</td>
|
|
<td><!-- TMPL_VAR NAME=finetype --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Opłata wpisowa</td>
|
|
<td><!-- TMPL_VAR NAME=enrolmentfee --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Potrzebne upomnienie o zaległości</td>
|
|
<td><!-- TMPL_IF NAME=overduenoticerequired -->Tak<!-- TMPL_ELSE -->Nie<!-- /TMPL_IF --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Limit wypożyczeń</td>
|
|
<td><!-- TMPL_VAR NAME=issuelimit --></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Opłata rezerwacyjna</td>
|
|
<td><!-- TMPL_VAR NAME=reservefee --></td>
|
|
</tr>
|
|
<!-- TMPL_IF NAME=totalgtzero -->
|
|
<tr>
|
|
<td colspan=2 align=center><b>Ten rekord był w użyciu <!-- TMPL_VAR NAME=total --> razy. Wymazanie nie jest możliwe</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>POTWIERDŹ WYMAZANIE</td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type=submit value="TAK"></form></td>
|
|
<td><form action='<!-- TMPL_VAR NAME=script_name -->' method=post><input type=submit value="NIE"></form></td>
|
|
</tr>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME=delete_confirmed -->
|
|
Dane wymazane
|
|
<form action='<!-- TMPL_VAR NAME="script_name" -->' method=post>
|
|
<input type=submit value=OK>
|
|
</form>
|
|
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME=else -->
|
|
<h2>Kategoria Czytelników - zarządzanie</h2>
|
|
<!-- TMPL_IF NAME=searchfield -->
|
|
Szukano <!-- TMPL_VAR name=searchfield -->
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_UNLESS name="categoryChild" -->
|
|
<div id="problem">
|
|
OSTRZEŻENIE: musisz posiadać kod kategorii = P dla podopiecznych
|
|
</div
|
|
><!-- /TMPL_UNLESS -->
|
|
<!-- TMPL_UNLESS name="categoryInstitution" -->
|
|
<div id="problem">
|
|
OSTRZEŻENIE: musisz posiadać kod kategorii - I dla Instytucji
|
|
</div>
|
|
<!-- /TMPL_UNLESS -->
|
|
<form action='<TMPL_VAR NAME="script_name">' method=post>
|
|
<input type=text name=description value=<!-- TMPL_VAR name="searchfield" -->>
|
|
<input type="submit" name="submit" value="OK" class="button">
|
|
</form>
|
|
|
|
<table border=0 cellspacing=0 cellpadding=5>
|
|
<tr bgcolor='#99cc33'>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Kategoria</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Wyjaśnienie</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Okres wpisu</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Opłata wpisowa</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Górna Granica Wieku</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Wymagany Wiek</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Kara</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Zaległe</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Limit wypożyczeń</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'><b>Rezerwacja</b></td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif'> </td>
|
|
<td background='<!-- TMPL_VAR name="themelang" -->/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=enrolmentfee --></td>
|
|
<td><!-- TMPL_VAR NAME=upperagelimit --></td>
|
|
<td><!-- TMPL_VAR NAME=dateofbirthrequired --></td>
|
|
<td><!-- TMPL_VAR NAME=finetype --></td>
|
|
<td><!-- TMPL_IF NAME=overduenoticerequired -->
|
|
<i>Tak</i>
|
|
<!-- TMPL_ELSE -->
|
|
<i>Nie</i>
|
|
<!-- /TMPL_IF -->
|
|
</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 -->"><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=script_name -->?op=delete_confirm&categorycode=<!-- TMPL_VAR NAME=categorycode -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" border="0"></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=submit class="button" value="Dodaj kategorię" alt="Dodaj kategorię"><br>
|
|
</form></p>
|
|
<!-- /TMPL_IF -->
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->
|