1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Letters Administration</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_INCLUDE NAME="header.inc" -->
6 <!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
8 <div id="doc3" class="yui-t2">
12 <div class="yui-b"><div class="yui-g">
14 <!-- TMPL_IF NAME="else" -->
15 <form action="/cgi-bin/koha/tools/letter.pl" method="post">
16 <input type="text" name="searchfield" value="">
17 <input type="submit" class="button" value="Filter"></form>
18 <!-- TMPL_IF NAME="search" -->
19 <br />You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b><p><br />
29 <!-- TMPL_LOOP NAME="letter" -->
30 <tr bgcolor=<!-- TMPL_VAR NAME="toggle" --> >
31 <td><!-- TMPL_VAR NAME="module" --></td>
32 <td><!-- TMPL_VAR NAME="code" --></td>
33 <td><!-- TMPL_VAR NAME="name" --></td>
35 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=<!-- TMPL_VAR name="module" -->&code=<!-- TMPL_VAR NAME="code" -->">Edit</a>
38 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&module=<!-- TMPL_VAR name="module"-->&code=<!-- TMPL_VAR NAME="code" -->">Delete</a>
43 <form action="/cgi-bin/koha/tools/letter.pl" method="post">
44 <input type="hidden" name="op" value="add_form">
46 <input type="submit" class="button" value="Add Letter" title="Add Letter" alt="Add Letter">
52 <!-- TMPL_IF NAME="add_form" -->
53 <script language="javascript" type="text/javascript">
54 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
55 function isNotNull(f,noalert) {
56 if (f.value.length ==0) {
61 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
63 var x=f.value.toUpperCase();
67 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
68 function isNum(v,maybenull) {
69 var n = new Number(v.value);
73 if (maybenull==0 && v.value=='') {
78 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
80 var t = Date.parse(f.value);
85 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
90 /* if (!(isNotNull(window.document.Aform.code))) {
91 _alertString += "\n- " + _("Code missing");
93 /* if (!(isNotNull(window.document.Aform.name))) {
94 _alertString += "\n- " + _("Name missing");
96 if (_alertString.length==0) {
97 document.Aform.submit();
99 alertString2 = _("Form not submitted because of the following problem(s)");
100 alertString2 += "\n------------------------------------------------------------------------------------\n";
101 alertString2 += _alertString;
105 // GPL code coming from PhpMyAdmin
106 function insertValueQuery() {
107 var myQuery = document.Aform.content;
108 var myListBox = document.Aform.SQLfieldname;
110 if(myListBox.options.length > 0) {
113 for(var i=0; i<myListBox.options.length; i++) {
114 if (myListBox.options[i].selected){
118 chaineAj += myListBox.options[i].value;
123 if (document.selection) {
125 sel = document.selection.createRange();
127 document.Aform.insert.focus();
129 //MOZILLA/NETSCAPE support
130 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
131 var startPos = document.Aform.content.selectionStart;
132 var endPos = document.Aform.content.selectionEnd;
133 var chaineSql = document.Aform.content.value;
134 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
136 myQuery.value += chaineAj;
142 <!-- TMPL_IF name="modify" -->
143 <h2 class="parameters">Modify letter</h2>
145 <h2 class="parameters">Add letter</h2>
147 <form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
148 <input type="hidden" name="op" value="add_validate">
149 <input type="hidden" name="checked" value="0">
150 <!-- TMPL_IF NAME="modify" -->
152 <label class="label100">Koha module:</label>
153 <select name="module">
154 <!--TMPL_IF Name="catalogue"-->
155 <option value="catalogue" selected="selected">Catalogue</option>
157 <option value="catalogue" >Catalogue</option>
159 <!--TMPL_IF Name="Serial"-->
160 <option value="serial" selected="selected">Serial</option>
162 <option value="serial">Serial</option>
164 <!--TMPL_IF Name="claimacquisition"-->
165 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
167 <option value="claimacquisition">Claim Acquisition</option>
169 <!--TMPL_IF Name="claimissues"-->
170 <option value="claimissues" selected="selected">Claim Issues</option>
172 <option value="claimissues">Claim Issues</option>
174 <!--TMPL_IF Name="circulation"-->
175 <option value="circulation" selected="selected">Circulation</option>
177 <option value="circulation">Circulation</option>
179 <!--TMPL_IF Name="members"-->
180 <option value="members" selected="selected">Members</option>
182 <option value="members">Members</option>
187 <label class="label100">Code:</label><input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="code" -->
191 <!-- TMPL_IF NAME="adding" -->
193 <label class="label100">Koha module:</label>
194 <select name="module" onchange="javascript:window.location.href = unescape(window.location.pathname)+'?op=add_form&module='+this.value+'&content='+window.document.forms['Aform'].elements['content'].value;">
195 <!--TMPL_IF Name="catalogue"-->
196 <option value="catalogue" selected="selected">Catalogue</option>
198 <option value="catalogue" >Catalogue</option>
200 <!--TMPL_IF Name="serial"-->
201 <option value="serial" selected="selected">Serial</option>
203 <option value="serial">Serial</option>
205 <!--TMPL_IF Name="claimacquisition"-->
206 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
208 <option value="claimacquisition">Claim Acquisition</option>
210 <!--TMPL_IF Name="claimissues"-->
211 <option value="claimissues" selected="selected">Claim Issues</option>
213 <option value="claimissues">Claim Issues</option>
215 <!--TMPL_IF Name="circulation"-->
216 <option value="circulation" selected="selected">Circulation</option>
218 <option value="circulation">Circulation</option>
220 <!--TMPL_IF Name="members"-->
221 <option value="members" selected="selected">Members</option>
223 <option value="members">Members</option>
228 <label class="label100">Code:</label><input type="text" name="code" size="20" maxlength="20">
233 <label class="label100">Name:</label><input type="text" name="name" size="60" value="<!-- TMPL_VAR NAME="name" -->">
236 <label class="label100">Title (mail subject):</label><input type="text" name="title" size="60" value="<!-- TMPL_VAR NAME="title" -->">
239 <label class="label100">Content (mail content):</label>
242 <select name="SQLfieldname" size="9">
243 <!-- TMPL_LOOP name="SQLfieldname" -->
244 <option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
247 <input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" />
248 <textarea name="content" cols="100" rows="15"><!-- TMPL_VAR NAME="content" --></textarea>
250 <p><input type="button" value="OK" onclick="Check(this.form)" class="button"></p>
254 <!-- TMPL_IF NAME="add_validate" -->
256 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
257 <input type="submit" value="OK">
261 <!-- TMPL_IF NAME="delete_confirm" -->
262 <table border="0" cellspacing="0" cellpadding="5">
263 <tr valign="top" bgcolor="#99cc33">
264 <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
267 <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
268 <b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
272 <form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed">
273 <input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->">
274 <input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->">
277 <td><!-- TMPL_VAR NAME="Name" --></td>
280 <td colspan="2" align="center">CONFIRM DELETION</td>
284 <input type="submit" value="YES">
288 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
289 <input type="submit" value="NO">
296 <!-- TMPL_IF NAME="delete_confirmed" -->
298 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
299 <input type="submit" value="OK">
307 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
308 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->