1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Tools › Notices[% IF ( add_form ) %][% IF ( modify ) %] › Modify notice[% ELSE %] › Add notice[% END %][% END %][% IF ( add_validate ) %] › Notice added[% END %][% IF ( delete_confirm ) %] › Confirm Deletion[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5 <script type="text/javascript">
7 $(document).ready(function() {
8 $("#lettert").tablesorter({
11 headers: { 3: {sorter:false},4: { sorter: false }}
16 function isNotNull(f,noalert) {
17 if (f.value.length ==0) {
24 var x=f.value.toUpperCase();
29 function isNum(v,maybenull) {
30 var n = new Number(v.value);
34 if (maybenull==0 && v.value=='') {
41 var t = Date.parse(f.value);
51 /* if (!(isNotNull(window.document.Aform.code))) {
52 _alertString += "\n- " + _("Code missing");
54 /* if (!(isNotNull(window.document.Aform.name))) {
55 _alertString += "\n- " + _("Name missing");
57 if (_alertString.length==0) {
58 document.Aform.submit();
60 alertString2 = _("Form not submitted because of the following problem(s)");
61 alertString2 += "\n------------------------------------------------------------------------------------\n";
62 alertString2 += _alertString;
66 // GPL code coming from PhpMyAdmin
67 function insertValueQuery() {
68 var myQuery = document.Aform.content;
69 var myListBox = document.Aform.SQLfieldname;
71 if(myListBox.options.length > 0) {
74 for(var i=0; i<myListBox.options.length; i++) {
75 if (myListBox.options[i].selected){
79 chaineAj += myListBox.options[i].value;
84 if (document.selection) {
86 sel = document.selection.createRange();
88 document.Aform.insert.focus();
90 //MOZILLA/NETSCAPE support
91 else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
92 var startPos = document.Aform.content.selectionStart;
93 var endPos = document.Aform.content.selectionEnd;
94 var chaineSql = document.Aform.content.value;
95 myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
97 myQuery.value += chaineAj;
106 [% INCLUDE 'header.inc' %]
107 [% INCLUDE 'letters-search.inc' %]
109 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF ( add_form ) %][% IF ( modify ) %]<a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Modify notice[% ELSE %] <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Add notice[% END %][% ELSE %][% IF ( add_validate ) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Notice added[% ELSE %][% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices</a> › Confirm Deletion[% ELSE %]Notices[% END %][% END %][% END %]</div>
111 [% IF ( add_form ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %]
117 [% IF ( no_op_set ) %]
119 <script type="text/javascript">
121 // prepare DOM for YUI Toolbar
122 $(document).ready(function() {
125 // YUI Toolbar Functions
126 function yuiToolbar() {
127 new YAHOO.widget.Button("newnotice");
132 <li><a id="newnotice" href="/cgi-bin/koha/tools/letter.pl?op=add_form">New Notice</a></li>
136 <p>You Searched for <b>[% searchfield %]</b></p>
138 [% IF ( letter ) %]<table id="lettert">
146 <tbody>[% FOREACH lette IN letter %]
147 [% UNLESS ( loop.odd ) %]
148 <tr class="highlight">
152 <td>[% lette.module %]</td>
153 <td>[% lette.code %]</td>
154 <td>[% lette.name %]</td>
156 <a href="/cgi-bin/koha/tools/letter.pl?op=add_form&module=[% lette.module %]&code=[% lette.code %]">Edit</a>
159 [% IF ( lette.protected ) %]
162 <a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&module=[% lette.module %]&code=[% lette.code %]">Delete</a>
172 [% IF ( add_form ) %]
174 <form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
175 <input type="hidden" name="op" value="add_validate" />
176 <input type="hidden" name="checked" value="0" />
178 <input type="hidden" name="add" value="0" />
180 <input type="hidden" name="add" value="1" />
182 <fieldset class="rows">
183 <legend>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</legend>
186 <label for="module">Koha module:</label>
187 [% IF ( modify ) %]<select name="module" id="module">[% END %] [% IF ( adding ) %] <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;">[% END %]
188 [% IF ( catalogue ) %]
189 <option value="catalogue" selected="selected">Catalog</option>
191 <option value="catalogue" >Catalog</option>
193 [% IF ( circulation ) %]
194 <option value="circulation" selected="selected">Circulation</option>
196 <option value="circulation">Circulation</option>
198 [% IF ( claimacquisition ) %]
199 <option value="claimacquisition" selected="selected">Claim Acquisition</option>
201 <option value="claimacquisition">Claim Acquisition</option>
203 [% IF ( claimissues ) %]
204 <option value="claimissues" selected="selected">Claim Serial Issue</option>
206 <option value="claimissues">Claim Serial Issue</option>
208 [% IF ( reserves ) %]
209 <option value="reserves" selected="selected">Holds</option>
211 <option value="reserves">Holds</option>
214 <option value="members" selected="selected">Members</option>
216 <option value="members">Members</option>
219 <option value="serial" selected="selected">Serials (Routing List)</option>
221 <option value="serial">Serials (Routing List)</option>
223 [% IF ( suggestions ) %]
224 <option value="suggestions" selected="selected">Suggestions</option>
226 <option value="suggestions">Suggestions</option>
231 <span class="label">Code:</span>[% IF ( adding ) %]<input type="text" id="code" name="code" size="20" maxlength="20" />[% ELSE %]<input type="hidden" id="code" name="code" value="[% code %]" />[% code %][% END %]
234 <label for="name">Name:</label><input type="text" id="name" name="name" size="60" value="[% name %]" />
237 <label for="title">Message Subject:</label><input type="text" id="title" name="title" size="60" value="[% title %]" />
240 <label for="SQLfieldname">Message Body:</label>
244 <tr><td><select name="SQLfieldname" id="SQLfieldname" size="9">
245 [% FOREACH SQLfieldnam IN SQLfieldname %]
246 <option value="[% SQLfieldnam.value %]">[% SQLfieldnam.text %]</option>
248 </select></td><td><input type="button" name="insert" value=">>" onclick="insertValueQuery()" title="Insert" /></td><td><textarea name="content" cols="80" rows="15">[% content %]</textarea></td></tr></table>
253 <fieldset class="action"><input type="button" value="Submit" onclick="Check(this.form)" class="button" /></fieldset>
257 [% IF ( add_validate ) %]
259 <form action="[% action %]" method="post">
260 <input type="submit" value="OK" />
264 [% IF ( delete_confirm ) %]
265 <div class="dialog alert"><h3>Delete Notice?</h3>
275 <td>[% module %]</td>
280 <form action="[% action %]" method="post">
281 <input type="hidden" name="op" value="delete_confirmed">
282 <input type="hidden" name="code" value="[% code %]" />
283 <input type="hidden" name="module" value="[% module %]" />
284 <input type="submit" value="Yes, Delete" class="approve" />
287 <form action="[% action %]" method="get">
288 <input type="submit" value="No, Do Not Delete" class="deny" />
294 [% IF ( delete_confirmed ) %]
296 <form action="[% action %]" method="post">
297 <input type="submit" value="OK" />
303 [% UNLESS ( add_form ) %]
304 <div class="yui-b noprint">
305 [% INCLUDE 'tools-menu.inc' %]
309 [% INCLUDE 'intranet-bottom.inc' %]