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="menus.inc" -->
5 <!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
7 <!-- TMPL_IF NAME="else" -->
8 <form action="/cgi-bin/koha/tools/letter.pl" method="post">
9 <input type="text" name="searchfield" value="">
10 <input type="submit" class="button" value="Filter"></form>
11 <!-- TMPL_IF NAME="search" -->
12 <br>You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b><p><br>
22 <!-- TMPL_LOOP NAME="letter" -->
23 <tr bgcolor=<!-- TMPL_VAR NAME="toggle" --> >
24 <td><!-- TMPL_VAR NAME="module" --></td>
25 <td><!-- TMPL_VAR NAME="code" --></td>
26 <td><!-- TMPL_VAR NAME="name" --></td>
28 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=<!-- TMPL_VAR name="module" -->&code=<!-- TMPL_VAR NAME="code" -->">Edit</a>
31 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&module=<!-- TMPL_VAR name="module"-->&code=<!-- TMPL_VAR NAME="code" -->">Delete</a>
36 <form action="/cgi-bin/koha/tools/letter.pl" method="post">
37 <input type="hidden" name="op" value="add_form">
39 <input type="submit" class="button" value="Add Letter" title="Add Letter" alt="Add Letter">
45 <!-- TMPL_IF NAME="add_form" -->
46 <script language="javascript" type="text/javascript">
47 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
48 function isNotNull(f,noalert) {
49 if (f.value.length ==0) {
54 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
56 var x=f.value.toUpperCase();
60 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
61 function isNum(v,maybenull) {
62 var n = new Number(v.value);
66 if (maybenull==0 && v.value=='') {
71 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
73 var t = Date.parse(f.value);
78 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
83 /* if (!(isNotNull(window.document.Aform.code))) {
84 _alertString += "\n- " + _("Code missing");
86 /* if (!(isNotNull(window.document.Aform.name))) {
87 _alertString += "\n- " + _("Name missing");
89 if (_alertString.length==0) {
90 document.Aform.submit();
92 alertString2 = _("Form not submitted because of the following problem(s)");
93 alertString2 += "\n------------------------------------------------------------------------------------\n";
94 alertString2 += _alertString;
98 // GPL code coming from PhpMyAdmin
99 function insertValueQuery() {
100 var myQuery = document.Aform.content;
101 var myListBox = document.Aform.SQLfieldname;
103 if(myListBox.options.length > 0) {
106 for(var i=0; i<myListBox.options.length; i++) {
107 if (myListBox.options[i].selected){
111 chaineAj += myListBox.options[i].value;
116 if (document.selection) {
118 sel = document.selection.createRange();
120 document.Aform.insert.focus();
122 //MOZILLA/NETSCAPE support
123 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
124 var startPos = document.Aform.content.selectionStart;
125 var endPos = document.Aform.content.selectionEnd;
126 var chaineSql = document.Aform.content.value;
127 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
129 myQuery.value += chaineAj;
136 <!-- TMPL_IF name="modify" -->
137 <h2 class="parameters">Modify letter</h2>
139 <h2 class="parameters">Add letter</h2>
141 <form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
142 <input type="hidden" name="op" value="add_validate">
143 <input type="hidden" name="checked" value="0">
144 <!-- TMPL_IF NAME="modify" -->
146 <label class="label100">Koha module:</label>
147 <select name="module">
148 <!--TMPL_IF Name="catalogue"-->
149 <option value="catalogue" selected>Catalogue</option>
151 <option value="catalogue" >Catalogue</option>
153 <!--TMPL_IF Name="Serial"-->
154 <option value="serial" selected>Serial</option>
156 <option value="serial">Serial</option>
158 <!--TMPL_IF Name="claimacquisition"-->
159 <option value="claimacquisition" selected>Claim Acquisition</option>
161 <option value="claimacquisition">Claim Acquisition</option>
163 <!--TMPL_IF Name="claimissues"-->
164 <option value="claimissues" selected>Claim Issues</option>
166 <option value="claimissues">Claim Issues</option>
168 <!--TMPL_IF Name="circulation"-->
169 <option value="circulation" selected>Circulation</option>
171 <option value="circulation">Circulation</option>
173 <!--TMPL_IF Name="members"-->
174 <option value="members" selected>Members</option>
176 <option value="members">Members</option>
181 <label class="label100">Code:</label><input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="code" -->
185 <!-- TMPL_IF NAME="adding" -->
187 <label class="label100">Koha module:</label>
188 <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;">
189 <!--TMPL_IF Name="catalogue"-->
190 <option value="catalogue" selected>Catalogue</option>
192 <option value="catalogue" >Catalogue</option>
194 <!--TMPL_IF Name="serial"-->
195 <option value="serial" selected>Serial</option>
197 <option value="serial">Serial</option>
199 <!--TMPL_IF Name="claimacquisition"-->
200 <option value="claimacquisition" selected>Claim Acquisition</option>
202 <option value="claimacquisition">Claim Acquisition</option>
204 <!--TMPL_IF Name="claimissues"-->
205 <option value="claimissues" selected>Claim Issues</option>
207 <option value="claimissues">Claim Issues</option>
209 <!--TMPL_IF Name="circulation"-->
210 <option value="circulation" selected>Circulation</option>
212 <option value="circulation">Circulation</option>
214 <!--TMPL_IF Name="members"-->
215 <option value="members" selected>Members</option>
217 <option value="members">Members</option>
222 <label class="label100">Code:</label><input type="text" name="code" size="20" maxlength="20">
227 <label class="label100">Name:</label><input type="text" name="name" size="60" value="<!-- TMPL_VAR NAME="name" -->">
230 <label class="label100">Title (mail subject):</label><input type="text" name="title" size="60" value="<!-- TMPL_VAR NAME="title" -->">
233 <label class="label100">Content (mail content):</label>
236 <select name="SQLfieldname" size=9>
237 <!-- TMPL_LOOP name="SQLfieldname" -->
238 <option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
241 <input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" />
242 <textarea name="content" cols="100" rows="15"><!-- TMPL_VAR NAME="content" --></textarea>
244 <p><input type="button" value="OK" onclick="Check(this.form)" class="button"></p>
249 <!-- TMPL_IF NAME="add_validate" -->
251 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
252 <input type="submit" value="OK">
256 <!-- TMPL_IF NAME="delete_confirm" -->
257 <table border="0" cellspacing="0" cellpadding="5">
258 <tr valign="top" bgcolor="#99cc33">
259 <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
262 <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
263 <b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
267 <form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed">
268 <input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->">
269 <input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->">
272 <td><!-- TMPL_VAR NAME="Name" --></td>
275 <td colspan="2" align="center">CONFIRM DELETION</td>
279 <input type="submit" value="YES">
283 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
284 <input type="submit" value="NO">
291 <!-- TMPL_IF NAME="delete_confirmed" -->
293 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
294 <input type="submit" value="OK">
298 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->