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;
60 function report_itemtype(value_to_report) {
61 Aform.imageurl.value=value_to_report;
65 <!-- TMPL_IF NAME="add_form" -->
66 <!-- TMPL_IF NAME="itemtype" -->
67 <h1 class="parameters">Modify item type</h1>
69 <h1 class="parameters">Add item type</h1>
71 <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
72 <input type="hidden" name="op" value="add_validate">
73 <input type="hidden" name="checked" value="0">
74 <!-- TMPL_IF NAME="itemtype" -->
75 <p><label class="label100">Item type<label><input type="hidden" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="itemtype" --></p>
77 <p><label class="label100">Item type<label><input type="text" name="itemtype" size="6" maxlength="4" onblur="toUC(this)"></p>
80 <label class="label100">Description</label>
81 <input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" escape=HTML -->">
84 <label class="label100">Image</label>
85 <input type="text" name="imageurl" value="<!-- TMPL_VAR name="imageurl" -->" size="40" maxlength="80">
86 <!-- TMPL_LOOP NAME="IMAGESLOOP" -->
87 <a href="javascript:report_itemtype('<!-- TMPL_VAR name="KohaImage" -->')"><img src="/opac-tmpl/<!-- TMPL_VAR name="opacthemes" -->/itemtypeimg/<!-- TMPL_VAR name="KohaImage" -->"></a>
91 <label class="label100">Not for loan</label>
92 <!-- TMPL_IF NAME="notforloan" -->
93 <input type="checkbox" name="notforloan" checked value="1">
95 <input type="checkbox" name="notforloan" value="1">
97 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
100 <label class="label100" name="renewalsallowed">Number of renewals allowed</label>
101 <input type="text" name="renewalsallowed" value="<!-- TMPL_VAR NAME="renewalsallowed" -->">
104 <label class="label100">Rental charge</label>
105 <input type="text" name="rentalcharge" size="10" value="<!-- TMPL_VAR NAME="rentalcharge" -->">
108 <input type="button" value="OK" class="button" onclick="Check(this.form)">
113 <!-- TMPL_IF NAME="delete_confirm" -->
114 <p><label>Item type</label><!-- TMPL_VAR NAME="itemtype" --></p>
115 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
116 <input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->">
117 <p><label>Description</label><!-- TMPL_VAR NAME="description" --></p>
118 <p><label>Renewals</label><!-- TMPL_IF NAME="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></p>
119 <p><lable>Rental charge</label><!-- TMPL_VAR NAME="rentalcharge" --></p>
120 <!-- TMPL_IF NAME="total" -->
122 <b>This record is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</b>
126 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" class="button parameters"></form>
129 <p>CONFIRM DELETION</p>
131 <input type="submit" value="YES" class="button parameters"></form>
132 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="NO" class="button parameters"></form>
138 <!-- TMPL_IF NAME="else" -->
139 <h1 class="parameters">Item type Admin</h1>
142 <th class="parameters">Code</th>
143 <th class="parameters">Description</th>
144 <th class="parameters">not for loan</th>
145 <th class="parameters">Renewable</th>
146 <th class="parameters">Charge</th>
147 <th class="parameters">Edit</th>
148 <th class="parameters">Delete</th>
150 <!-- TMPL_LOOP NAME="loop" -->
153 <!-- TMPL_IF name="imageurl" -->
154 <!-- TMPL_IF name="absoluteurl" -->
155 <img src="<!-- TMPL_VAR name="imageurl" -->">
157 <img src="/opac-tmpl/<!-- TMPL_VAR name="opacthemes" -->/itemtypeimg/<!-- TMPL_VAR name="imageurl" -->">
160 <!-- TMPL_VAR NAME="itemtype" -->
162 <td><!-- TMPL_VAR NAME="description" --></td>
163 <td><!-- TMPL_IF NAME="notforloan" -->Yes<!-- /TMPL_IF --></td>
164 <td><!-- TMPL_UNLESS name="notforloan" -->
165 <!-- TMPL_IF NAME="renewalsallowed" -->
166 <!-- TMPL_VAR name="renewalsallowed" --> time(s)
170 <!-- /TMPL_UNLESS -->
172 <td><!-- TMPL_UNLESS name="notforloan" --><!-- TMPL_VAR NAME="rentalcharge" --><!-- /TMPL_UNLESS --></td>
173 <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>
174 <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>
178 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
179 <input type="hidden" name="op" value="add_form">
180 <input type="submit" class="button parameters" value="Add item type" title="Add item type" alt="Add item type" >
181 <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>
182 <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>
186 <!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->