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">Notices</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 <!-- TMPL_IF name="modify" -->
163 <input type="hidden" name="add" value="0" />
165 <input type="hidden" name="add" value="1" />
167 <fieldset class="rows">
168 <legend><!-- TMPL_IF name="modify" -->Modify notice<!-- TMPL_ELSE -->Add notice<!-- /TMPL_IF --></legend>
170 <!-- TMPL_IF NAME="modify" -->
172 <label for="module">Koha module:</label>
173 <select name="module" id="module">
174 <!--TMPL_IF Name="catalogue"-->
175 <option value="catalogue" selected="selected">Catalogue</option>
177 <option value="catalogue" >Catalogue</option>
179 <!--TMPL_IF Name="Serial"-->
180 <option value="serial" selected="selected">Serials (Routing List)</option>
182 <option value="serial">Serials (Routing List)</option>
184 <!--TMPL_IF Name="claimacquisition"-->
185 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
187 <option value="claimacquisition">Claim Acquisition</option>
189 <!--TMPL_IF Name="claimissues"-->
190 <option value="claimissues" selected="selected">Claim Serial Issue</option>
192 <option value="claimissues">Claim Serial Issue</option>
194 <!--TMPL_IF Name="circulation"-->
195 <option value="circulation" selected="selected">Circulation</option>
197 <option value="circulation">Circulation</option>
199 <!--TMPL_IF Name="members"-->
200 <option value="members" selected="selected">Members</option>
202 <option value="members">Members</option>
207 <span class="label">Code:</span><input type="hidden" id="code" name="code" value="<!-- TMPL_VAR NAME="code" -->" /><!-- TMPL_VAR NAME="code" -->
211 <!-- TMPL_IF NAME="adding" -->
213 <label for="module">Koha module:</label>
214 <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;">
215 <!--TMPL_IF Name="catalogue"-->
216 <option value="catalogue" selected="selected">Catalogue</option>
218 <option value="catalogue" >Catalogue</option>
220 <!--TMPL_IF Name="serial"-->
221 <option value="serial" selected="selected">Serials (Routing List)</option>
223 <option value="serial">Serials (Routing List)</option>
225 <!--TMPL_IF Name="claimacquisition"-->
226 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
228 <option value="claimacquisition">Claim Acquisition</option>
230 <!--TMPL_IF Name="claimissues"-->
231 <option value="claimissues" selected="selected">Claim Serial Issues</option>
233 <option value="claimissues">Claim Serial Issues</option>
235 <!--TMPL_IF Name="circulation"-->
236 <option value="circulation" selected="selected">Circulation</option>
238 <option value="circulation">Circulation</option>
240 <!--TMPL_IF Name="members"-->
241 <option value="members" selected="selected">Members</option>
243 <option value="members">Members</option>
248 <label for="code">Code:</label><input type="text" id="code" name="code" size="20" maxlength="20" />
253 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="<!-- TMPL_VAR NAME="name" -->" />
256 <label for="title">Message Subject:</label><input type="text" id="title" name="title" size="60" value="<!-- TMPL_VAR NAME="title" -->" />
259 <label for="SQLfieldname">Message Body:</label>
263 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
264 <!-- TMPL_LOOP name="SQLfieldname" -->
265 <option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
267 </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>
272 <fieldset class="action"><input type="button" value="Submit" onclick="Check(this.form)" class="button" /></fieldset>
276 <!-- TMPL_IF NAME="add_validate" -->
278 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
279 <input type="submit" value="OK" />
283 <!-- TMPL_IF NAME="delete_confirm" -->
284 <div class="dialog alert"><h3>Delete Notice?</h3>
291 <b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
296 <td><!-- TMPL_VAR NAME="Name" --></td>
299 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
300 <input type="hidden" name="op" value="delete_confirmed">
301 <input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->" />
302 <input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->" />
303 <input type="submit" value="Yes, Delete" class="approve" />
306 <form action="<!-- TMPL_VAR NAME="action" -->" method="get">
307 <input type="submit" value="No, Do Not Delete" class="deny" />
313 <!-- TMPL_IF NAME="delete_confirmed" -->
315 <form action="<!-- TMPL_VAR NAME="action" -->" method="post">
316 <input type="submit" value="OK" />
322 <!-- TMPL_UNLESS NAME="add_form" -->
323 <div class="yui-b noprint">
324 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
326 <!-- /TMPL_UNLESS -->
328 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->