1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Tools › Notices<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF name="modify" --> › Modify notice<!-- TMPL_ELSE --> › Add notice<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF NAME="add_validate" --> › Notice added<!-- /TMPL_IF --><!-- TMPL_IF NAME="delete_confirm" --> › Confirm Deletion<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!-- TMPL_IF NAME="add_form" -->
5 <script type="text/javascript">
8 function isNotNull(f,noalert) {
9 if (f.value.length ==0) {
16 var x=f.value.toUpperCase();
21 function isNum(v,maybenull) {
22 var n = new Number(v.value);
26 if (maybenull==0 && v.value=='') {
33 var t = Date.parse(f.value);
43 /* if (!(isNotNull(window.document.Aform.code))) {
44 _alertString += "\n- " + _("Code missing");
46 /* if (!(isNotNull(window.document.Aform.name))) {
47 _alertString += "\n- " + _("Name missing");
49 if (_alertString.length==0) {
50 document.Aform.submit();
52 alertString2 = _("Form not submitted because of the following problem(s)");
53 alertString2 += "\n------------------------------------------------------------------------------------\n";
54 alertString2 += _alertString;
58 // GPL code coming from PhpMyAdmin
59 function insertValueQuery() {
60 var myQuery = document.Aform.content;
61 var myListBox = document.Aform.SQLfieldname;
63 if(myListBox.options.length > 0) {
66 for(var i=0; i<myListBox.options.length; i++) {
67 if (myListBox.options[i].selected){
71 chaineAj += myListBox.options[i].value;
76 if (document.selection) {
78 sel = document.selection.createRange();
80 document.Aform.insert.focus();
82 //MOZILLA/NETSCAPE support
83 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
84 var startPos = document.Aform.content.selectionStart;
85 var endPos = document.Aform.content.selectionEnd;
86 var chaineSql = document.Aform.content.value;
87 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
89 myQuery.value += chaineAj;
98 <!-- TMPL_INCLUDE NAME="header.inc" -->
99 <!-- TMPL_INCLUDE NAME="letters-search.inc" -->
101 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF name="modify" --><a href="/cgi-bin/koha/tools/letter.pl">Noticess</a> › Modify notice<!-- TMPL_ELSE --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Add notice<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_IF NAME="add_validate" --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Notice added<!-- TMPL_ELSE --><!-- TMPL_IF NAME="delete_confirm" --> <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Confirm Deletion<!-- TMPL_ELSE -->Notices<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF --></div>
103 <!-- TMPL_IF NAME="add_form" --><div id="doc" class="yui-t7"><!-- TMPL_ELSE --><div id="doc3" class="yui-t2"><!-- /TMPL_IF -->
109 <!-- TMPL_IF NAME="else" -->
111 <script type="text/javascript">
113 // prepare DOM for YUI Toolbar
114 $(document).ready(function() {
117 // YUI Toolbar Functions
118 function yuiToolbar() {
119 new YAHOO.widget.Button("newnotice");
124 <li><a id="newnotice" href="/cgi-bin/koha/tools/letter.pl?op=add_form">New Notice</a></li>
127 <!-- TMPL_IF NAME="search" -->
128 <p>You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b></p>
130 <!-- TMPL_IF NAME="letter" --><table>
138 <!-- TMPL_LOOP NAME="letter" -->
139 <tr bgcolor=<!-- TMPL_VAR NAME="toggle" --> >
140 <td><!-- TMPL_VAR NAME="module" --></td>
141 <td><!-- TMPL_VAR NAME="code" --></td>
142 <td><!-- TMPL_VAR NAME="name" --></td>
144 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=<!-- TMPL_VAR name="module" -->&code=<!-- TMPL_VAR NAME="code" -->">Edit</a>
147 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&module=<!-- TMPL_VAR name="module"-->&code=<!-- TMPL_VAR NAME="code" -->">Delete</a>
156 <!-- TMPL_IF NAME="add_form" -->
159 <form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
160 <input type="hidden" name="op" value="add_validate" />
161 <input type="hidden" name="checked" value="0" />
162 <fieldset class="rows">
163 <legend><!-- TMPL_IF name="modify" -->Modify letter<!-- TMPL_ELSE -->Add letter<!-- /TMPL_IF --></legend>
165 <!-- TMPL_IF NAME="modify" -->
167 <label for="module">Koha module:</label>
168 <select name="module" id="module">
169 <!--TMPL_IF Name="catalogue"-->
170 <option value="catalogue" selected="selected">Catalogue</option>
172 <option value="catalogue" >Catalogue</option>
174 <!--TMPL_IF Name="Serial"-->
175 <option value="serial" selected="selected">Serial</option>
177 <option value="serial">Serial</option>
179 <!--TMPL_IF Name="claimacquisition"-->
180 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
182 <option value="claimacquisition">Claim Acquisition</option>
184 <!--TMPL_IF Name="claimissues"-->
185 <option value="claimissues" selected="selected">Claim Issues</option>
187 <option value="claimissues">Claim Issues</option>
189 <!--TMPL_IF Name="circulation"-->
190 <option value="circulation" selected="selected">Circulation</option>
192 <option value="circulation">Circulation</option>
194 <!--TMPL_IF Name="members"-->
195 <option value="members" selected="selected">Members</option>
197 <option value="members">Members</option>
202 <span class="label">Code:</span><input type="hidden" id="code" name="code" value="<!-- TMPL_VAR NAME="code" -->" /><!-- TMPL_VAR NAME="code" -->
206 <!-- TMPL_IF NAME="adding" -->
208 <label for="module">Koha module:</label>
209 <select name="module" id="module" onchange="javascript:window.location.href = unescape(window.location.pathname)+'?op=add_form&module='+this.value+'&content='+window.document.forms['Aform'].elements['content'].value;">
210 <!--TMPL_IF Name="catalogue"-->
211 <option value="catalogue" selected="selected">Catalogue</option>
213 <option value="catalogue" >Catalogue</option>
215 <!--TMPL_IF Name="serial"-->
216 <option value="serial" selected="selected">Serial</option>
218 <option value="serial">Serial</option>
220 <!--TMPL_IF Name="claimacquisition"-->
221 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
223 <option value="claimacquisition">Claim Acquisition</option>
225 <!--TMPL_IF Name="claimissues"-->
226 <option value="claimissues" selected="selected">Claim Issues</option>
228 <option value="claimissues">Claim Issues</option>
230 <!--TMPL_IF Name="circulation"-->
231 <option value="circulation" selected="selected">Circulation</option>
233 <option value="circulation">Circulation</option>
235 <!--TMPL_IF Name="members"-->
236 <option value="members" selected="selected">Members</option>
238 <option value="members">Members</option>
243 <label for="code">Code:</label><input type="text" id="code" name="code" size="20" maxlength="20" />
248 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="<!-- TMPL_VAR NAME="name" -->" />
251 <label for="title">Message Subject:</label><input type="text" id="title" name="title" size="60" value="<!-- TMPL_VAR NAME="title" -->" />
254 <label for="SQLfieldname">Message Body:</label>
258 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
259 <!-- TMPL_LOOP name="SQLfieldname" -->
260 <option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
262 </select></td><td><input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" /></td><td><textarea name="content" cols="80" rows="15"><!-- TMPL_VAR NAME="content" --></textarea></td></tr></table>
267 <fieldset class="action"><input type="button" value="Submit" onclick="Check(this.form)" class="button" /></fieldset>
271 <!-- TMPL_IF NAME="add_validate" -->
273 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
274 <input type="submit" value="OK" />
278 <!-- TMPL_IF NAME="delete_confirm" -->
279 <h3>Delete Notice?</h3>
286 <b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
291 <td><!-- TMPL_VAR NAME="Name" --></td>
294 <p><form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed">
295 <input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->" />
296 <input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->" />
297 <input type="submit" value="YES" />
300 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
301 <input type="submit" value="NO" />
307 <!-- TMPL_IF NAME="delete_confirmed" -->
309 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
310 <input type="submit" value="OK" />
316 <!-- TMPL_UNLESS NAME="add_form" --><div class="yui-b">
317 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
318 </div><!-- /TMPL_UNLESS -->
320 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->