Bug 20298: (follow-up) fix labels' for attributes
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / letter.tt
1 [% USE Koha %]
2 [% USE Branches %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Tools &rsaquo; Notices[% IF ( add_form or copy_form ) %][% IF ( modify ) %] &rsaquo; Modify notice[% ELSE %] &rsaquo; Add notice[% END %][% END %][% IF ( add_validate or copy_validate) %] &rsaquo; Notice added[% END %][% IF ( delete_confirm ) %] &rsaquo; Confirm deletion[% END %]</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
8 </head>
9
10 <body id="tools_letter" class="tools">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'letters-search.inc' %]
13
14 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; [% IF ( add_form or copy_form) %][% IF ( modify ) %]<a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; Slips</a> &rsaquo; Modify notice[% ELSE %] <a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; Slips</a> &rsaquo; Add notice[% END %][% ELSE %][% IF ( add_validate or copy_validate) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; Slips</a> &rsaquo; Notice added[% ELSE %][% IF ( delete_confirm ) %] <a href="/cgi-bin/koha/tools/letter.pl">Notices &amp; Slips</a> &rsaquo; Confirm deletion[% ELSE %]Notices &amp; Slips[% END %][% END %][% END %]</div>
15
16 [% IF add_form or copy_form %]
17     <div class="main container-fluid">
18         <div class="row">
19             <div class="col-md-8 col-md-offset-2">
20 [% ELSE %]
21     <div id="doc3" class="yui-t2">
22         <div id="bd">
23             <div id="yui-main">
24                 <div class="yui-b">
25 [% END %]
26
27
28 [% IF ( no_op_set ) %]
29     <h1>Notices and Slips</h1>
30     <form method="get" action="/cgi-bin/koha/tools/letter.pl" id="selectlibrary">
31       <input type="hidden" name="searchfield" value="[% searchfield | html %]" />
32     [% UNLESS independant_branch %]
33       <p>
34         Select a library :
35             <select name="branchcode" id="branch" style="width:20em;">
36                 <option value="*">All libraries</option>
37                 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
38             </select>
39       </p>
40     [% END %]
41       <div id="toolbar" class="btn-toolbar">
42           <button type="submit" class="btn btn-default btn-sm" id="newnotice"><i class="fa fa-plus"></i> New notice</button>
43         <input type="hidden" id="op" name="op" />
44       </div>
45     </form>
46
47                 [% IF ( search ) %]
48         <p>You searched for <b>[% searchfield | html %]</b></p>
49                 [% END %]
50                 [% IF ( letter && !independant_branch) %]
51             [% select_for_copy = BLOCK %]
52             <select name="branchcode">
53                 [% FOREACH l IN Branches.all() %]
54                 <option value="[% l.branchcode %]">Copy to [% l.branchname %]</option>
55                 [% END %]
56             </select>
57             [% END %]
58         [% END %]
59         [% IF letter %]
60           <table id="lettert">
61             <thead>
62               <tr>
63                 <th>Library</th>
64                 <th>Module</th>
65                 <th>Code</th>
66                 <th>Name</th>
67                 <th class="nosort">Copy notice</th>
68                 <th class="nosort">Actions</th>
69               </tr>
70             </thead>
71             <tbody>
72               [% FOREACH lette IN letter %]
73                 [% can_edit = lette.branchcode || !independant_branch %]
74                 <tr>
75                   <td>[% IF lette.branchname %][% lette.branchname %][% ELSE %](All libraries)[% END %]</td>
76                   <td>[% lette.module %]</td>
77                   <td>[% lette.code %]</td>
78                   <td>[% lette.name %]</td>
79                   <td class="actions">
80                     [% IF !independant_branch || !lette.branchcode %]
81                       <form method="post" action="/cgi-bin/koha/tools/letter.pl">
82                         <input type="hidden" name="op" value="copy_form" />
83                         <input type="hidden" name="oldbranchcode" value="[% lette.branchcode %]" />
84                         <input type="hidden" name="module" value="[% lette.module %]" />
85                         <input type="hidden" name="code" value="[% lette.code %]" />
86                         [% IF independant_branch %]
87                           <input type="hidden" name="branchcode" value="[% independant_branch %]" />
88                         [% ELSE %]
89                           [% select_for_copy %]
90                         [% END %]
91                         <button class="btn btn-default btn-xs"><i class="fa fa-clone"></i> Copy</button>
92                       </form>
93                     [% END %]
94                   </td>
95                   <td class="actions">
96                     [% IF can_edit %]
97                       <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;branchcode=[% lette.branchcode %]&amp;module=[% lette.module %]&amp;code=[% lette.code %]"><i class="fa fa-pencil"></i> Edit</a>
98                     [% END %]
99                     [% IF !lette.protected && can_edit %]
100                       <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&amp;branchcode=[%lette.branchcode %]&amp;module=[% lette.module %]&amp;code=[% lette.code %]"><i class="fa fa-trash"></i> Delete</a>
101                     [% END %]
102                   </td>
103                 </tr>
104               [% END %]
105             </tbody>
106           </table>
107         [% ELSE %]
108           <div class="dialog message">
109           [% IF ( branchcode ) %]
110              <p>There are no notices for this library.</p>
111           [% ELSE %]
112               <p>There are no notices.</p>
113           [% END %]
114           </div>
115         [% END %]
116 [% END %]
117
118         
119 [% IF add_form or copy_form %]
120 <h1>[% IF ( modify ) %]Modify notice[% ELSE %]Add notice[% END %]</h1>
121
122     <div id="toolbar" class="btn-toolbar">
123         <div class="btn-group">
124             <button class="btn btn-default btn-sm" id="submit_form"><i class="fa fa-save"></i> Save</button>
125             <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
126             <span class="caret"></span>
127             </button>
128             <ul class="dropdown-menu">
129                 <li><a id="saveandcontinue" href="#">Save and continue editing</a></li>
130             </ul>
131         </div>
132         <a class="btn btn-default btn-sm cancel" href="/cgi-bin/koha/tools/letter.pl"><i class="fa fa-remove"></i> Cancel</a>
133     </div>
134
135         <form id="add_notice" name="Aform" method="post" enctype="multipart/form-data" class="validate">
136         [% IF add_form %]
137           <input type="hidden" name="op" id="op" value="add_validate" />
138         [% ELSE %]
139           <input type="hidden" name="op" id="op" value="copy_validate" />
140         [% END %]
141
142                 <input type="hidden" name="checked" value="0" />
143                 [% IF ( modify ) %]
144                 <input type="hidden" name="add" value="0" />
145                 [% ELSE %]
146                 <input type="hidden" name="add" value="1" />
147                 [% END %]
148                 <fieldset class="rows">
149             <input type="hidden" name="oldbranchcode" value="[% oldbranchcode %]" />
150             <ol>
151             [% IF independant_branch %]
152                 <input type="hidden" name="branchcode" value="[% independant_branch %]" />
153             [% ELSE %]
154             <li>
155
156                 [% IF adding %]
157                     <label for="branch">Library:</label>
158                     <select name="branchcode" id="branch" style="width:20em;">
159                         <option value="">All libraries</option>
160                         [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
161                     </select>
162                 [% ELSE %]
163                     <span class="label">Library:</span>
164                     <input type="hidden" id="branch" name="branchcode" value="[% branchcode %]" />
165                     [% IF ( branchcode ) %]
166                        [% Branches.GetName( branchcode ) %]
167                     [% ELSE %]
168                         All libraries
169                     [% END %]
170                 [% END %]
171             </li>
172             [% END %]
173                         <li>
174                                 <label for="module">Koha module:</label>
175                                 <input type="hidden" name="oldmodule" value="[% module %]" />
176                 [% IF adding  %]
177                   <select name="module" id="newmodule">
178                 [% ELSE %]
179                   <select name="module" id="module">
180                 [% END %]
181                                     [% IF ( module == "acquisition" ) %]
182                                       <option value="acquisition" selected="selected">Acquisition</option>
183                                     [% ELSE %]
184                                       <option value="acquisition" >Acquisition</option>
185                                     [% END %]
186                                     [% IF ( module == "catalogue" ) %]
187                                       <option value="catalogue" selected="selected">Catalog</option>
188                                     [% ELSE %]
189                                       <option value="catalogue" >Catalog</option>
190                                     [% END %]
191                                     [% IF ( module == "circulation" ) %]
192                                       <option value="circulation" selected="selected">Circulation</option>
193                                     [% ELSE %]
194                                       <option value="circulation">Circulation</option>
195                                     [% END %]
196                                     [% IF ( module == "orderacquisition" ) %]
197                                       <option value="orderacquisition" selected="selected">Order acquisition</option>
198                                     [% ELSE %]
199                                       <option value="orderacquisition">Order acquisition</option>
200                                     [% END %]
201                                     [% IF ( module == "claimacquisition" ) %]
202                                       <option value="claimacquisition" selected="selected">Claim acquisition</option>
203                                     [% ELSE %]
204                                       <option value="claimacquisition">Claim acquisition</option>
205                                     [% END %]
206                                     [% IF ( module == "claimissues" ) %]
207                                       <option value="claimissues" selected="selected">Claim serial issue</option>
208                                     [% ELSE %]
209                                       <option value="claimissues">Claim serial issue</option>
210                                     [% END %]
211                                     [% IF ( module == "reserves" ) %]
212                                       <option value="reserves" selected="selected">Holds</option>
213                                     [% ELSE %]
214                                       <option value="reserves">Holds</option>
215                                     [% END %]
216                                     [% IF ( module == "members" ) %]
217                                       <option value="members" selected="selected">Members</option>
218                                     [% ELSE %]
219                                       <option value="members">Members</option>
220                                     [% END %]
221                                     [% IF ( module == "serial" ) %]
222                                       <option value="serial" selected="selected">Serials (routing list)</option>
223                                     [% ELSE %]
224                                       <option value="serial">Serials (routing list)</option>
225                                     [% END %]
226                                     [% IF ( module == "suggestions" ) %]
227                                       <option value="suggestions" selected="selected">Suggestions</option>
228                                     [% ELSE %]
229                                       <option value="suggestions">Suggestions</option>
230                                     [% END %]
231                 </select>
232             </li>
233             <li>
234               [% IF adding %]
235                   <label for="code" class="required">Code:</label>
236                   <input type="text" id="code" name="code" size="20" maxlength="20" value="" required="required"/>
237                   <span class="required">Required</span>
238               [% ELSE %]
239                   <span class="label">Code:</span>
240                   <input type="hidden" id="code" name="code" value="[% code %]" />
241                   [% code %]
242               [% END %]
243             </li>
244             <li>
245               <label for="name" class="required">Name:</label>
246               <input type="text" id="name" name="name" size="60" value="[% letter_name %]" required="required" />
247               <span class="required">Required</span>
248             </li>
249         </ol>
250     </fieldset>
251         [% IF Koha.Preference('TranslateNotices') %]
252         <div style="clear:both"></div>
253             <div id="tabs">
254                 <ul>
255                     <li><a href="#lang_default">Default</a></li>
256                     [% FOR language IN languages %]
257                         [% FOR sublanguage IN language.sublanguages_loop %]
258                             [% IF language.plural %]
259                                 <li><a href="#lang_[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] [% sublanguage.region_description %] ([% sublanguage.rfc4646_subtag %])</a></li>
260                             [% ELSE %]
261                                 <li><a href="#lang_[% sublanguage.rfc4646_subtag %]">[% sublanguage.native_description %] ([% sublanguage.rfc4646_subtag %])</a></li>
262                             [% END %]
263                         [% END %]
264                     [% END %]
265                 </ul>
266         [% END %]
267
268         [% FOREACH lang IN letters.keys %]
269             <div id="lang_[% lang %]">
270         <div class="transport-types" style="clear:both">
271         [% FOR mtt IN letters.$lang.templates.keys.sort %]
272             [% SET letter = letters.$lang.templates.$mtt %]
273             <h3>
274                 [% SWITCH letter.message_transport_type %]
275                 [% CASE 'email' %]
276                   Email
277                 [% CASE 'print' %]
278                   Print
279                 [% CASE 'sms' %]
280                   SMS
281                 [% CASE 'feed' %]
282                   Feed
283                 [% CASE 'phone' %]
284                   Phone
285                 [% CASE %]
286                   [% letter.message_transport_type %]
287                 [% END %]
288             </h3>
289             [% IF letter.message_transport_type == "sms" and not Koha.Preference("SMSSendDriver") %]
290               <fieldset class="rows mtt" id="[% letter.message_transport_type %]_[% lang %]" disabled="disabled">
291                 <div class="dialog message">You should enable the SMSSendDriver preference to use the SMS templates.</div>
292             [% ELSIF letter.message_transport_type == "phone" and not Koha.Preference("TalkingTechItivaPhoneNotification") %]
293               <fieldset class="rows mtt" id="[% letter.message_transport_type %]_[% lang %]" disabled="disabled">
294                 <div class="dialog message">You should enable the TalkingTechItivaPhoneNotification preference to use the phone templates.</div>
295             [% ELSE %]
296               <fieldset class="rows mtt" id="[% letter.message_transport_type %]_[% lang %]">
297             [% END %]
298               <ol>
299                 <li>
300                   <input type="hidden" name="message_transport_type" value="[% letter.message_transport_type %]" />
301                   <input type="hidden" name="lang" value="[% lang %]" />
302                   <label for="is_html_[% letter.message_transport_type %]_[% lang %]">HTML message:</label>
303                   [% IF letter.is_html %]
304                     <input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]_[% lang %]" value="1" checked="checked" />
305                   [% ELSE %]
306                     <input type="checkbox" name="is_html_[% letter.message_transport_type %]" id="is_html_[% letter.message_transport_type %]_[% lang %]" value="1" />
307                   [% END %]
308                 </li>
309                 <li>
310                   <label for="title_[% letter.message_transport_type %]_[% lang %]">Message subject:</label><input type="text" id="title_[% letter.message_transport_type %]_[% lang %]" name="title" size="60" value="[% letter.title %]" />
311                 </li>
312                 <li>
313                   <label for="SQLfieldname_[% letter.message_transport_type %]_[% lang %]">Message body:</label>
314                   [% IF letter.message_transport_type == 'sms' %]
315                     <span class="sms_counter" id="sms_counter_[% lang %]">[% IF letter.content && letter.content.length > 0 %][% letter.content.length %][% ELSE %]0[% END %]/160 characters</span>
316                   [% END %]
317                   <table>
318                     <tr>
319                       <td>
320                         <select name="SQLfieldname" id="SQLfieldname_[% letter.message_transport_type %]_[% lang %]" multiple="multiple" size="9">
321                           [% FOREACH SQLfieldname IN SQLfieldnames %]
322                             <option value="[% SQLfieldname.value %]">[% SQLfieldname.text %]</option>
323                           [% END %]
324                         </select>
325                       </td>
326                         <td class="actions">
327                             <button type="button" data-containerid="[% letter.message_transport_type %]_[% lang %]" class="btn btn-default btn-sm insert">Insert <i class="fa fa-long-arrow-right"></i></button>
328                         </td>
329                       <td><textarea name="content" data-lang="[% lang %]" class="content_[% letter.message_transport_type %]" id="content_[% letter.message_transport_type %]_[% lang %]" cols="80" rows="15">[% letter.content %]</textarea></td>
330                     </tr>
331                   </table>
332                 </li>
333               </ol>
334             </fieldset>
335             [% END %]
336             </div>
337         </div> <!-- / #transport-types -->
338         [% END %]
339         [% IF Koha.Preference('TranslateNotices') %]
340         </div>
341         [% END %]
342
343         [% IF code.search('DGST') %] <span class="overdue">Warning, this is a template for a Digest, as such, any references to branch data ( e.g. branches.branchname ) will refer to the borrower's home branch.</span> [% END %]
344
345         <input type="hidden" id="redirect" name="redirect" value="" />
346         <input type="hidden" name="searchfield" value="[% searchfield %]" />
347     </form>
348 [% END %]
349
350 [% IF ( add_validate or copy_validate) %]
351         Data recorded
352         <form action="[% action %]" method="post">
353         <input type="submit" value="OK" />
354         </form>
355 [% END %]
356
357 [% IF ( delete_confirm ) %]
358     <div class="dialog alert">
359         <h3>Delete notice?</h3>
360         <table>
361             <thead>
362             <tr>
363                 <th>Library</th>
364                 <th>Module</th>
365                 <th>Code</th>
366                 <th>Name</th>
367             </tr>
368             </thead>
369             <tr>
370                 <td>[% IF letter.branchcode %][% Branches.GetName( letter.branchcode ) %][% ELSE %](All libraries)[% END %]</td>
371                 <td>[% letter.module %]</td>
372                 <td>[% letter.code %]</td>
373                 <td>[% letter.name %]</td>
374             </tr>
375         </table>
376             <form action="[% action %]" method="post">
377             <input type="hidden" name="op" value="delete_confirmed">
378             <input type="hidden" name="branchcode" value="[% letter.branchcode %]" />
379             <input type="hidden" name="code" value="[% letter.code %]" />
380             <input type="hidden" name="module" value="[% letter.module %]" />
381             <button type="submit" class="approve"><i class="fa fa-check"></i> Yes, delete</button>
382         </form>
383
384         <form action="[% action %]" method="get">
385             <button type="submit" class="deny"><i class="fa fa-times"></i> No, do not delete</button>
386         </form>
387     </div>
388 [% END %]
389
390 [% IF ( delete_confirmed ) %]
391         Data deleted
392         <form action="[% action %]" method="post">
393         <input type="submit" value="OK" />
394         </form>
395 [% END %]
396
397 </div>
398 </div>
399 [% UNLESS add_form or copy_form %]
400     <div class="yui-b noprint">
401         [% INCLUDE 'tools-menu.inc' %]
402     </div>
403 [% END %]
404 </div>
405
406 [% MACRO jsinclude BLOCK %]
407     <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
408     [% INCLUDE 'datatables.inc' %]
409     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat_[% KOHA_VERSION %].js"></script>
410     <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.insertatcaret_[% KOHA_VERSION %].js"></script>
411     <script type="text/javascript">
412         $(document).ready(function() {
413             [% IF add_form or copy_form %]
414                 $('#toolbar').fixFloat();
415             [% END %]
416             $("#lettert:has(tbody tr)").dataTable($.extend(true, {}, dataTablesDefaults, {
417                 "sDom": 't',
418                 "aoColumnDefs": [
419                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'nosort' ] }
420                 ],
421                 "bPaginate": false
422             }));
423             [% IF no_op_set %]
424                 $('#branch').change(function() {
425                     $('#op').val("");
426                     $('#selectlibrary').submit();
427                 });
428                 $('#newnotice').click(function() {
429                     $('#op').val("add_form");
430                     return true;
431                 });
432             [% END %]
433
434             $("#newmodule").on("change",function(){
435                 if( $("#branch").val() == ""){
436                     var branchcode = "*";
437                 } else {
438                     var branchcode = $("#branch").val();
439                 }
440                 window.location.href = "/cgi-bin/koha/tools/letter.pl?op=add_form&module=" + $(this).val() + "&branchcode=" + branchcode;
441             });
442
443             $("#submit_form").click( function(event) {
444                 event.preventDefault();
445                 var at_least_one_exists = 0;
446                 var are_valid = 1;
447                 $("fieldset.mtt").each( function(){
448                     var title = $(this).find('input[name="title"]').val();
449                     var content = $(this).find('textarea[name="content"]').val();
450                     if (
451                             ( title.length == 0 && content.length > 0 )
452                          || ( title.length > 0 && content.length == 0 )
453                     ) {
454                         var mtt = $(this).find('input[name="message_transport_type"]').val();
455                         var msg = _("Please specify title and content for %s");
456                         msg = msg.replace( "%s", mtt );
457                         at_least_one_exists = 1;
458                         alert(msg);
459                         return are_valid = false;
460                     } else if ( title.length > 0 && content.length > 0 ) {
461                         at_least_one_exists = 1;
462                     }
463                 } );
464                 if ( ! at_least_one_exists ) {
465                     alert( _("Please fill at least one template.") );
466                     return false;
467                 }
468                 if ( ! are_valid ) {
469                     return false;
470                 }
471
472                 // Test if code already exists in DB
473                 var new_lettercode = $("#code").val();
474                 var new_branchcode = $("#branch").val();
475                 [% IF ( add_form and code ) # IF edit %]
476                     if ( new_lettercode != '[% code %]' ) {
477                 [% END %]
478                     $.ajax({
479                         data: { code: new_lettercode, branchcode: new_branchcode },
480                         type: 'GET',
481                         url: '/cgi-bin/koha/svc/letters/',
482                         success: function (data) {
483                              if ( data.letters.length > 0 ) {
484                                  if( new_branchcode == '' ) {
485                                      alert( _("A default letter with the code '%s' already exists.").format(new_lettercode) );
486                                  } else {
487                                      alert( _("A letter with the code '%s' already exists for '%s'.").format(new_lettercode, new_branchcode) );
488                                  }
489                                  return false;
490                              } else {
491                                  $("#add_notice").submit();
492                              }
493                         },
494                     });
495                 [% IF ( add_form and code ) %]
496                     } else {
497                         $("#add_notice").submit();
498                     }
499                 [% END %]
500             });
501
502             var sms_limit = 160;
503             $(".content_sms").on("keyup", function(){
504                 var length = $(this).val().length;
505                 var sms_counter = ("#sms_counter_" + $(this).data('lang'));
506                 $(sms_counter).html(length + "/" + sms_limit + _(" characters"));
507                 if ( length  > sms_limit ) {
508                     $(sms_counter).css("color", "red");
509                 } else {
510                     $(sms_counter).css("color", "black");
511                 }
512             });
513             $( ".transport-types" ).accordion({ collapsible: true, active:false, animate: 200 });
514             $(".insert").on("click",function(){
515                 var containerid = $(this).data("containerid");
516                 insertValueQuery( containerid );
517             })
518
519             $("#tabs").tabs();
520
521             $("#saveandcontinue").on("click",function(e){
522                 e.preventDefault();
523                 $("#redirect").val("just_save");
524                 $("#submit_form").click();
525             });
526
527         });
528         [% IF add_form or copy_form %]
529             function cancel(f) {
530                 $('#op').val("");
531                 f.method = "get";
532                 f.submit();
533             }
534
535             function isNotNull(f,noalert) {
536               if (f.value.length ==0) {
537                   return false;
538               }
539               return true;
540             }
541
542             function isNum(v,maybenull) {
543                 var n = new Number(v.value);
544                 if (isNaN(n)) {
545                     return false;
546                 }
547                 if (maybenull==0 && v.value==''){
548                   return false;
549                 }
550                 return true;
551             }
552             function insertValueQuery(containerid) {
553                 var fieldset = $("#" + containerid);
554                 var myQuery = $(fieldset).find('textarea[name="content"]');
555                 var myListBox = $(fieldset).find('select[name="SQLfieldname"]');
556
557                 if($(myListBox).find('option').length > 0) {
558                     $(myListBox).find('option').each( function (){
559                         if ( $(this).attr('selected') && $(this).val().length > 0 ) {
560                             $(myQuery).insertAtCaret("<<" + $(this).val() + ">>");
561                         }
562                     });
563                 }
564             }
565         [% END %]
566     </script>
567 [% END %]
568
569 [% INCLUDE 'intranet-bottom.inc' %]