1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Letters Administration</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
6 <!-- TMPL_INCLUDE NAME="header.inc" -->
8 <!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
10 <div id="doc3" class="yui-t2">
14 <div class="yui-b"><div class="yui-g">
16 <!-- TMPL_IF NAME="else" -->
17 <form action="/cgi-bin/koha/tools/letter.pl" method="post">
18 <input type="text" name="searchfield" value="">
19 <input type="submit" class="button" value="Filter"></form>
20 <!-- TMPL_IF NAME="search" -->
21 <br />You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b><p><br />
31 <!-- TMPL_LOOP NAME="letter" -->
32 <tr bgcolor=<!-- TMPL_VAR NAME="toggle" --> >
33 <td><!-- TMPL_VAR NAME="module" --></td>
34 <td><!-- TMPL_VAR NAME="code" --></td>
35 <td><!-- TMPL_VAR NAME="name" --></td>
37 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=<!-- TMPL_VAR name="module" -->&code=<!-- TMPL_VAR NAME="code" -->">Edit</a>
40 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&module=<!-- TMPL_VAR name="module"-->&code=<!-- TMPL_VAR NAME="code" -->">Delete</a>
45 <form action="/cgi-bin/koha/tools/letter.pl" method="post">
46 <input type="hidden" name="op" value="add_form">
48 <input type="submit" class="button" value="Add Letter" title="Add Letter" alt="Add Letter">
54 <!-- TMPL_IF NAME="add_form" -->
55 <script language="javascript" type="text/javascript">
56 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
57 function isNotNull(f,noalert) {
58 if (f.value.length ==0) {
63 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
65 var x=f.value.toUpperCase();
69 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
70 function isNum(v,maybenull) {
71 var n = new Number(v.value);
75 if (maybenull==0 && v.value=='') {
80 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
82 var t = Date.parse(f.value);
87 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
92 /* if (!(isNotNull(window.document.Aform.code))) {
93 _alertString += "\n- " + _("Code missing");
95 /* if (!(isNotNull(window.document.Aform.name))) {
96 _alertString += "\n- " + _("Name missing");
98 if (_alertString.length==0) {
99 document.Aform.submit();
101 alertString2 = _("Form not submitted because of the following problem(s)");
102 alertString2 += "\n------------------------------------------------------------------------------------\n";
103 alertString2 += _alertString;
107 // GPL code coming from PhpMyAdmin
108 function insertValueQuery() {
109 var myQuery = document.Aform.content;
110 var myListBox = document.Aform.SQLfieldname;
112 if(myListBox.options.length > 0) {
115 for(var i=0; i<myListBox.options.length; i++) {
116 if (myListBox.options[i].selected){
120 chaineAj += myListBox.options[i].value;
125 if (document.selection) {
127 sel = document.selection.createRange();
129 document.Aform.insert.focus();
131 //MOZILLA/NETSCAPE support
132 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
133 var startPos = document.Aform.content.selectionStart;
134 var endPos = document.Aform.content.selectionEnd;
135 var chaineSql = document.Aform.content.value;
136 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
138 myQuery.value += chaineAj;
144 <!-- TMPL_IF name="modify" -->
145 <h2 class="parameters">Modify letter</h2>
147 <h2 class="parameters">Add letter</h2>
149 <form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
150 <input type="hidden" name="op" value="add_validate">
151 <input type="hidden" name="checked" value="0">
152 <!-- TMPL_IF NAME="modify" -->
154 <label class="label100">Koha module:</label>
155 <select name="module">
156 <!--TMPL_IF Name="catalogue"-->
157 <option value="catalogue" selected="selected">Catalogue</option>
159 <option value="catalogue" >Catalogue</option>
161 <!--TMPL_IF Name="Serial"-->
162 <option value="serial" selected="selected">Serial</option>
164 <option value="serial">Serial</option>
166 <!--TMPL_IF Name="claimacquisition"-->
167 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
169 <option value="claimacquisition">Claim Acquisition</option>
171 <!--TMPL_IF Name="claimissues"-->
172 <option value="claimissues" selected="selected">Claim Issues</option>
174 <option value="claimissues">Claim Issues</option>
176 <!--TMPL_IF Name="circulation"-->
177 <option value="circulation" selected="selected">Circulation</option>
179 <option value="circulation">Circulation</option>
181 <!--TMPL_IF Name="members"-->
182 <option value="members" selected="selected">Members</option>
184 <option value="members">Members</option>
189 <label class="label100">Code:</label><input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="code" -->
193 <!-- TMPL_IF NAME="adding" -->
195 <label class="label100">Koha module:</label>
196 <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;">
197 <!--TMPL_IF Name="catalogue"-->
198 <option value="catalogue" selected="selected">Catalogue</option>
200 <option value="catalogue" >Catalogue</option>
202 <!--TMPL_IF Name="serial"-->
203 <option value="serial" selected="selected">Serial</option>
205 <option value="serial">Serial</option>
207 <!--TMPL_IF Name="claimacquisition"-->
208 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
210 <option value="claimacquisition">Claim Acquisition</option>
212 <!--TMPL_IF Name="claimissues"-->
213 <option value="claimissues" selected="selected">Claim Issues</option>
215 <option value="claimissues">Claim Issues</option>
217 <!--TMPL_IF Name="circulation"-->
218 <option value="circulation" selected="selected">Circulation</option>
220 <option value="circulation">Circulation</option>
222 <!--TMPL_IF Name="members"-->
223 <option value="members" selected="selected">Members</option>
225 <option value="members">Members</option>
230 <label class="label100">Code:</label><input type="text" name="code" size="20" maxlength="20">
235 <label class="label100">Name:</label><input type="text" name="name" size="60" value="<!-- TMPL_VAR NAME="name" -->">
238 <label class="label100">Title (mail subject):</label><input type="text" name="title" size="60" value="<!-- TMPL_VAR NAME="title" -->">
241 <label class="label100">Content (mail content):</label>
244 <select name="SQLfieldname" size="9">
245 <!-- TMPL_LOOP name="SQLfieldname" -->
246 <option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
249 <input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" />
250 <textarea name="content" cols="100" rows="15"><!-- TMPL_VAR NAME="content" --></textarea>
252 <p><input type="button" value="OK" onclick="Check(this.form)" class="button"></p>
256 <!-- TMPL_IF NAME="add_validate" -->
258 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
259 <input type="submit" value="OK">
263 <!-- TMPL_IF NAME="delete_confirm" -->
264 <table border="0" cellspacing="0" cellpadding="5">
265 <tr valign="top" bgcolor="#99cc33">
266 <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
269 <td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
270 <b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
274 <form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed">
275 <input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->">
276 <input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->">
279 <td><!-- TMPL_VAR NAME="Name" --></td>
282 <td colspan="2" align="center">CONFIRM DELETION</td>
286 <input type="submit" value="YES">
290 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
291 <input type="submit" value="NO">
298 <!-- TMPL_IF NAME="delete_confirmed" -->
300 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
301 <input type="submit" value="OK">
309 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
310 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->