1 <!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
3 <script language="javascript" type="text/javascript">
4 function _(s) { return s } // dummy function for gettext
5 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
6 function isNotNull(f,noalert) {
7 if (f.value.length ==0) {
12 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
14 var x=f.value.toUpperCase();
18 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
19 function isNum(v,maybenull) {
20 var n = new Number(v.value);
24 if (maybenull==0 && v.value=='') {
29 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
31 var t = Date.parse(f.value);
36 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
41 if (f.itemtype.value.length==0) {
42 _alertString += "\n- " + _("Itemtype missing");
44 if (!(isNotNull(window.document.Aform.description,1))) {
45 _alertString += "\n- " + _("Description missing");
47 if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
48 _alertString += "\n- " + _("Rental charge is not a number");
50 if (_alertString.length==0) {
51 document.Aform.submit();
53 alertString2 = _("Form not submitted because of the following problem(s)");
54 alertString2 += "\n------------------------------------------------------------------------------------\n";
55 alertString2 += _alertString;
61 <!-- TMPL_IF NAME="add_form" -->
62 <!-- TMPL_IF NAME="itemtype" -->
63 <h1 class="parameters">Modify item type</h1>
65 <h1 class="parameters">Add item type</h1>
67 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
68 <input type="hidden" name="op" value="add_validate">
69 <input type="hidden" name="checked" value="0">
70 <!-- TMPL_IF NAME="itemtype" -->
71 <p><label class="label100">Item type<label><input type="hidden" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="itemtype" --></p>
73 <p><label class="label100">Item type<label><input type="text" name="itemtype" size="6" maxlength="4" onblur="toUC(this)"></p>
76 <label class="label100">Description</label>
77 <input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" escape=HTML -->">
80 <label class="label100">Not for loan</label>
81 <!-- TMPL_IF NAME="notforloan" -->
82 <input type="checkbox" name="notforloan" checked value="1">
84 <input type="checkbox" name="notforloan" value="1">
86 if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item
89 <label class="label100" name="renewalsallowed">Number of renewals allowed</label>
90 <input type="text" name="renewalsallowed" value="<!-- TMPL_VAR NAME="renewalsallowed" -->">
93 <label class="label100">Rental charge</label>
94 <input type="text" name="rentalcharge" size="10" value="<!-- TMPL_VAR NAME="rentalcharge" -->">
97 <input type="button" value="OK" class="button" onclick="Check(this.form)">
102 <!-- TMPL_IF NAME="delete_confirm" -->
103 <p><label>Item type</label><!-- TMPL_VAR NAME="itemtype" --></p>
104 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
105 <input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->">
106 <p><label>Description</label><!-- TMPL_VAR NAME="description" --></p>
107 <p><label>Renewals</label><!-- TMPL_IF NAME="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></p>
108 <p><lable>Rental charge</label><!-- TMPL_VAR NAME="rentalcharge" --></p>
109 <!-- TMPL_IF NAME="total" -->
111 <b>This record is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</b>
115 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" class="button parameters"></form>
118 <p>CONFIRM DELETION</p>
120 <input type="submit" value="YES" class="button parameters"></form>
121 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="NO" class="button parameters"></form>
127 <!-- TMPL_IF NAME="else" -->
128 <h1 class="parameters">Item type Admin</h1>
131 <th class="parameters">Code</th>
132 <th class="parameters">Description</th>
133 <th class="parameters">not for loan</th>
134 <th class="parameters">Renewable</th>
135 <th class="parameters">Charge</th>
136 <th class="parameters">Edit</th>
137 <th class="parameters">Delete</th>
139 <!-- TMPL_LOOP NAME="loop" -->
141 <td><!-- TMPL_VAR NAME="itemtype" --></td>
142 <td><!-- TMPL_VAR NAME="description" --></td>
143 <td><!-- TMPL_IF NAME="notforloan" -->Yes<!-- /TMPL_IF --></td>
144 <td><!-- TMPL_UNLESS name="notforloan" -->
145 <!-- TMPL_IF NAME="renewalsallowed" -->
146 <!-- TMPL_VAR name="renewalsallowed" --> time(s)
150 <!-- /TMPL_UNLESS -->
152 <td><!-- TMPL_UNLESS name="notforloan" --><!-- TMPL_VAR NAME="rentalcharge" --><!-- /TMPL_UNLESS --></td>
153 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&itemtype=<!-- TMPL_VAR NAME="itemtype" escape="HTML" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png" width="32" hspace="0" vspace="0" border="0"></a></td>
154 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&itemtype=<!-- TMPL_VAR NAME="itemtype" escape="HTML" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0"></a></td>
158 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
159 <input type="hidden" name="op" value="add_form">
160 <input type="submit" class="button parameters" value="Add item type" title="Add item type" alt="Add item type" >
161 <td width="33%"><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->"><input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0"></a><!-- /TMPL_IF --></td>
162 <td width="33%"><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->"><input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0"></a><!-- /TMPL_IF --></td>
166 <!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->