Bug 29299: (follow-up) Add markup comments
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-search.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% USE Branches %]
5 [% USE CGI %]
6 [% USE KohaDates %]
7 [% USE Koha %]
8 [% SET footerjs = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Serials [% biblionumber | html %] &rsaquo; Koha</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 <style>input.dt-filter { width : 100%; font-size : 85%; }</style>
13 </head>
14
15 <body id="ser_serials-home" class="ser">
16     [% INCLUDE 'header.inc' %]
17     [% INCLUDE 'serials-search.inc' %]
18
19     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20         <ol>
21             <li>
22                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23             </li>
24             [% IF ( done_searched ) %]
25                 <li>
26                     <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
27                 </li>
28                 <li>
29                     <a href="#" aria-current="page">
30                         Search results
31                     </a>
32                 </li>
33             [% ELSE %]
34                 <li>
35                     <a href="#" aria-current="page">
36                         Serials
37                     </a>
38                 </li>
39             [% END %]
40         </ol>
41     </nav>
42
43     [% url_params = [] %]
44     [% FOREACH param IN CGI.params.pairs %]
45         [% escaped_value = BLOCK %][% param.value | uri %][% END %]
46         [% url_params.push(param.key _ '=' _ escaped_value) %]
47     [% END %]
48
49     [% SET referrer = '/cgi-bin/koha/serials/serials-search.pl?' %]
50     [% referrer = BLOCK %][% referrer | url %][% url_params.join("&amp;") |uri %][% END %]
51     [% SET edit_action_link = '/cgi-bin/koha/serials/subscription-batchedit.pl?referrer=' _ referrer %]
52
53     [% BLOCK subscriptions_table %]
54         <form method="post">
55             [% IF closed %]
56                 [% SET tab = 'closed' %]
57             [% ELSE %]
58                 [% SET tab = 'opened' %]
59             [% END %]
60             [% IF CAN_user_serials_edit_subscription %]
61                 <div class="actions">
62                     <a class="select-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a>
63                     |
64                     <a class="clear-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
65                     <span class="itemselection_actions">
66                         | Actions:
67                         <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Edit selected serials</a>
68                     </span>
69                 </div>
70             [% END %]
71             <table>
72                 <thead>
73                     <tr>
74                         <th></th>
75                         <th>ISSN</th>
76                         <th class="anti-the">Title</th>
77                         <th>Notes</th>
78                         <th>Library</th>
79                         <th>Location</th>
80                         <th>Call number</th>
81                         [% UNLESS closed %]
82                             <th>Expiration date</th>
83                         [% END %]
84                         [% FOR field IN additional_fields_for_subscription %]
85                             <th>[% field.name | html %]</th>
86                         [% END %]
87                         <th class="NoSort noExport">Actions</th>
88                     </tr>
89                 </thead>
90                 <tbody>
91                     [% FOREACH subscription IN subscriptions %]
92                         [% UNLESS subscription.cannotdisplay %]
93                             <tr>
94                                 <td>
95                                     [% UNLESS subscription.cannotedit %]
96                                         <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" />
97                                     [% ELSE %]
98                                         <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" disabled="disabled" title="You cannot edit this subscription" />
99                                     [% END %]
100                                 </td>
101                                 <td>
102                                     [% IF ( subscription.issn ) %]
103                                         [% subscription.issn | html %]
104                                     [% END %]
105                                 </td>
106                                 <td>
107                                     <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]" class="button" title="subscription detail">[% subscription.title | html %]</a>
108                                 </td>
109                                 <td>
110                                     [% IF ( subscription.publicnotes ) %][% subscription.publicnotes | html %][% END %]
111                                     [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes | html %])[% END %]
112                                 </td>
113                                 <td>
114                                     [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) | html %][% END %]
115                                 </td>
116                                 <td>
117                                     [% IF ( subscription.location ) %]
118                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]
119                                     [% END %]
120                                 </td>
121                                 <td>
122                                     [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %]
123                                 </td>
124                                 [% UNLESS closed %]
125                                     <td data-order="[% subscription.enddate | html %]">
126                                         [% subscription.enddate | $KohaDates %]
127                                     </td>
128                                 [% END %]
129
130                                 [% FOR field IN additional_fields_for_subscription %]
131                                     [% IF field.authorised_value_category %]
132                                         <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) | html %]</td>
133                                     [% ELSE %]
134                                         <td>[% subscription.additional_fields.${field.name} | html %]</td>
135                                     [% END %]
136                                 [% END %]
137
138                                 <td>
139                                     <div class="btn-group dropup">
140                                         [% IF closed %]
141                                             <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid | html %]" role="button" data-toggle="dropdown" href="#">
142                                             Actions <b class="caret"></b>
143                                             </a>
144                                             <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid | html %]">
145
146                                                 [% IF ( routing && CAN_user_serials_routing ) %]
147                                                     [% UNLESS ( subscription.cannotedit ) %]
148                                                         <li>
149                                                             <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid | uri %]&amp;op=reopen&amp;routing=[% subscription.routing | uri %]&amp;searched=1&amp;title_filter=[% title_filter | uri %]&amp;ISSN_filter=[% ISSN_filter | uri %]&amp;EAN_filter=[% EAN_filter | uri %]&amp;published_filter=[% publisher_filter | uri %]&amp;bookseller_filter=[% bookseller_filter | uri %]&amp;branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa fa-repeat"></i> Reopen</a>
150                                                         </li>
151                                                     [% END %]
152                                                 [% END # IF ( routing && CAN_user_serials_routing ) %]
153
154                                                 <li>
155                                                     <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa fa-list-alt"></i> Issue history</a>
156                                                 </li>
157
158                                             </ul>
159                                         [% ELSE %]
160                                             <div class="btn-group">
161                                                 [% IF ( CAN_user_serials_receive_serials ) %]
162                                                     [%# There should be no space between these two buttons, it would render badly %]
163                                                     <a class="btn btn-default btn-xs" role="button"
164                                                     href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid | html %]&amp;serstatus=1,3,7"><i
165                                                     class="fa fa-inbox"></i> Serial receive</a><a
166                                                     class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button"
167                                                     data-toggle="dropdown" href="#"><b class="caret"></b></a>
168                                                 [% ELSE %]
169                                                     <a class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
170                                                 [% END %]
171                                             <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid | html %]">
172
173                                                 [% IF ( routing && CAN_user_serials_routing ) %]
174                                                     [% IF ( subscription.cannotedit ) %]
175                                                     [% ELSE %]
176                                                         [% IF ( subscription.routingedit ) %]
177                                                             <li>
178                                                                 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa fa-pencil"></i> Edit routing list ([% subscription.routingedit | html %])</a>
179                                                             </li>
180                                                         [% ELSE %]
181                                                             <li>
182                                                                 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]&amp;op=new"> <i class="fa fa-plus"></i> New routing list</a>
183                                                             </li>
184                                                         [% END %]
185                                                     [% END %]
186                                                 [% END # IF ( routing && CAN_user_serials_routing ) %]
187
188                                                 <li>
189                                                     <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa fa-list-alt"></i> Issue history</a>
190                                                 </li>
191                                             </ul>
192                                             </div>
193                                         [% END # IF closed %]
194                                     </div> <!-- /.btn-group -->
195                                 </td>
196
197                             </tr>
198                         [% END # /UNLESS subscription.cannotdisplay %]
199                     [% END  # /FOREACH subscription %]
200                 </tbody>
201                 <tfoot>
202                     <tr>
203                         <td></td>
204                         <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search ISSN" /></td>
205                         <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search title" /></td>
206                         <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search notes" /></td>
207                         <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search library" /></td>
208                         <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search location" /></td>
209                         <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search callnumber" /></td>
210                         [% SET column_num = 6 %]
211                         [% UNLESS closed %]
212                             <td><input type="text" class="dt-filter" data-column_num="7" placeholder="Search expiration date" /></td>
213                             [% SET column_num = column_num + 1 %]
214                         [% END %]
215                         [% FOR field IN additional_fields_for_subscription %]
216                             <td><input type="text" class="dt-filter" data-column_num="[% loop.count + column_num | html %]" placeholder="Search [% field.name | html %]" /></td>
217                         [% END %]
218                         <td></td>
219                     </tr>
220                 </tfoot>
221             </table>
222         </form>
223     [% END # /BLOCK subscriptions_table %]
224
225     <div class="main container-fluid">
226         <div class="row">
227             <div class="col-sm-10 col-sm-push-2">
228                 <main>
229
230                     [% INCLUDE 'serials-toolbar.inc' %]
231
232                     [% IF ( done_searched ) %]
233                         <h2>Serials subscriptions ([% total | html %] found)</h2>
234                     [% ELSE %]
235                         <h2>Serials subscriptions search</h2>
236                     [% END %]
237
238                     [% UNLESS ( done_searched ) %]
239                         <div id="advsearch" style="padding-bottom:3em;">
240                             <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
241                                 <fieldset class="rows">
242                                     <legend>Search subscriptions</legend>
243                                     <ol>
244                                         <li>
245                                             <label for="issn">ISSN:</label>
246                                             <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter | html %]" />
247                                         </li>
248                                         <li>
249                                             <label for="title">Title:</label>
250                                             <input type="text" id="title" name="title_filter" value="[% title_filter | html %]" />
251                                         </li>
252                                         [% IF ( marcflavour == "UNIMARC" ) %]
253                                             <li>
254                                                 <label for="ean">EAN:</label>
255                                                 <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter | html %]" />
256                                             </li>
257                                         [% END %]
258                                         <li>
259                                             <label for="callnumber">Call number:</label>
260                                             <input type="text" id="callnumber" name="callnumber_filter" value="[% callnumber_filter | html %]" />
261                                         </li>
262                                         <li>
263                                             <label for="publisher">Publisher:</label>
264                                             <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" />
265                                         </li>
266                                         <li>
267                                             <label for="bookseller">Vendor:</label>
268                                             <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" />
269                                         </li>
270                                         <li>
271                                             <label for="branch">Library:</label>
272                                             <select id="branch" name="branch_filter">
273                                                 <option value="">All</option>
274                                                 [%# FIXME Should not we filter the libraries? %]
275                                                 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch_filter, unfiltered => 1 ) %]
276                                             </select>
277                                         </li>
278                                         <li>
279                                             <label for="location">Location:</label>
280                                             [% PROCESS 'av-build-dropbox.inc' name="location_filter", category="LOC", default=location_filter, all=1 %]
281                                         </li>
282                                         <li>
283                                             <label for="to">Expires before:</label>
284                                             <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="flatpickr" />
285                                         </li>
286                                         [% INCLUDE 'additional-fields-entry.inc' available=additional_fields_for_subscription values=additional_field_filters wrap_fieldset=0 %]
287                                     </ol>
288                                     <input type="hidden" name="searched" value="1" />
289                                     [% IF ( mana ) %]
290                                         <input type="hidden" name="mana" value="1" />
291                                     [% END %]
292                                     <fieldset class="action">
293                                         <input type="submit" value="Search" />
294                                     </fieldset>
295                                 </fieldset> <!-- /.rows -->
296                             </form>
297                         </div> <!-- /#advsearch -->
298                     [% END # /UNLESS ( done_searched )%]
299
300                     [% IF ( done_searched ) %]
301                         [% IF ( total ) %]
302                             <div id="serialstabs" class="toptabs" style="clear:both;">
303                                 <ul class="ui-tabs-nav">
304                                     [% IF mana %]
305                                         <li><a href="#mana">Mana ([% total || 0 | html %])</a></li>
306                                     [% ELSE %]
307                                         <li><a href="#opened">Open ([% openedsubscriptions.size || 0 | html %])</a></li>
308                                         <li><a href="#closed">Closed ([% closedsubscriptions.size || 0 | html %])</a></li>
309                                     [% END %]
310                                 </ul>
311                                 [% IF mana %]
312                                     <div id="mana">
313                                         [% INCLUDE 'mana/mana-subscription-search-result.inc' %]
314                                     </div>
315                                 [% ELSE %]
316                                     <div id="opened">
317                                         [% IF openedsubscriptions %]
318                                             [% INCLUDE subscriptions_table subscriptions = openedsubscriptions %]
319                                         [% ELSE %]
320                                             <div class="dialog message">
321                                                 <p>Your search returned no open subscriptions.</p>
322                                             </div>
323                                         [% END %]
324                                     </div>
325                                     <div id="closed">
326                                         [% IF closedsubscriptions %]
327                                             [% INCLUDE subscriptions_table subscriptions = closedsubscriptions closed = 1 %]
328                                         [% ELSE %]
329                                             <div class="dialog message">
330                                                 <p>Your search returned no closed subscriptions.</p>
331                                             </div>
332                                         [% END %]
333                                     </div>
334                                 [% END # /IF mana %]
335                             </div> <!-- /#serialstabs -->
336                         [% ELSE %]
337                             <div class="dialog message">
338                                 <p>Your search returned no results.</p>
339                             </div>
340                         [% END # IF ( total ) %]
341                     [% END # /IF done_searched %]
342
343                 </main>
344             </div> <!-- /.col-sm-10.col-sm-push-2 -->
345
346             <div class="col-sm-2 col-sm-pull-10">
347                 <aside>
348
349                     [% INCLUDE 'serials-menu.inc' %]
350                     [% IF ( done_searched ) %]
351                         [% UNLESS ( mana ) %]
352                             <div id="advsearch">
353                                 <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
354                                     <fieldset class="brief">
355                                         <h4>Search subscriptions</h4>
356                                         <ol>
357                                             <li>
358                                                 <label for="issn">ISSN:</label>
359                                                 <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter | html %]" />
360                                             </li>
361                                             <li>
362                                                 <label for="title">Title:</label>
363                                                 <input type="text" id="title" name="title_filter" value="[% title_filter | html %]" />
364                                             </li>
365                                             [% IF ( marcflavour == "UNIMARC" ) %]
366                                                 <li>
367                                                     <label for="ean">EAN:</label>
368                                                     <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter | html %]" />
369                                                 </li>
370                                             [% END %]
371                                             <li>
372                                                 <label for="callnumber">Call number:</label>
373                                                 <input type="text" id="callnumber" name="callnumber_filter" value="[% callnumber_filter | html %]" />
374                                             </li>
375                                             <li>
376                                                 <label for="publisher">Publisher:</label>
377                                                 <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" />
378                                             </li>
379                                             <li>
380                                                 <label for="bookseller">Vendor:</label>
381                                                 <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" />
382                                             </li>
383                                             <li>
384                                                 <label for="branch">Library:</label>
385                                                 <select id="branch" name="branch_filter">
386                                                     <option value="">All</option>
387                                                     [%# FIXME Should not we filter the libraries? %]
388                                                     [% PROCESS options_for_libraries libraries => Branches.all( selected => branch_filter, unfiltered => 1 ) %]
389                                                 </select>
390                                             </li>
391                                             <li>
392                                                 <label for="location">Location:</label>
393                                                 [% PROCESS 'av-build-dropbox.inc' name="location_filter", category="LOC", default=location_filter, all=1 %]
394                                             </li>
395                                             <li>
396                                                 <label for="to">Expires before:</label>
397                                                 <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="flatpickr" />
398                                             </li>
399
400                                             [% FOR field IN additional_fields_for_subscription %]
401                                                 <li>
402                                                     <label for="additional_field_[% field.id | html %]ID"> [% field.name | html %]: </label>
403                                                     [% IF field.authorised_value_category %]
404                                                         <select id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]">
405                                                             <option value="">All</option>
406                                                             [% FOREACH av IN AuthorisedValues.GetAuthValueDropbox(field.authorised_value_category) %]
407                                                                 [% IF av.authorised_value == additional_field_filters.${field.id} %]
408                                                                     <option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option>
409                                                                 [% ELSE %]
410                                                                     <option value="[% av.authorised_value | html %]">[% av.lib | html %]</option>
411                                                                 [% END %]
412                                                             [% END %]
413                                                         </select>
414                                                     [% ELSE %]
415                                                         <input id="additional_field_[% field.id | html %]" type="text" value="[% additional_field_filters.${field.id} | html %]" name="additional_field_[% field.id | html %]" />
416                                                     [% END %]
417                                                 </li>
418                                             [% END %]
419                                         </ol>
420                                         <input type="hidden" name="searched" value="1" />
421                                         <fieldset class="action">
422                                             <input type="submit" value="Search" />
423                                         </fieldset>
424
425                                     </fieldset> <!-- /.brief -->
426                                 </form>
427                             </div> <!-- /#advsearch -->
428                         [% END # / UNLESS ( mana ) %]
429                     [% END # / IF ( done_searched ) %]
430                 </aside>
431             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
432         </div> <!-- /.row -->
433
434 [% MACRO jsinclude BLOCK %]
435     [% INCLUDE 'calendar.inc' %]
436     [% INCLUDE 'datatables.inc' %]
437     <script>
438         var subscriptionid = "[% subscriptionid | html %]";
439     </script>
440     [% Asset.js("js/serials-toolbar.js") | $raw %]
441     <script>
442
443             function itemSelectionBuildEditLink(div) {
444                 var subscription_ids = new Array();
445                 $("input[name='subscriptionid'][type='checkbox']:checked", div).each(function() {
446                     subscription_ids.push($(this).val());
447                 });
448                 if (subscription_ids.length > 0) {
449                     var url = "[% edit_action_link | html %]";
450                     url += '&subscriptionid=' + subscription_ids.join('&subscriptionid=');
451                     $('a.itemselection_action_modify').attr('href', url);
452                 } else {
453                     return false;
454                 }
455                 return true;
456             }
457
458             function itemSelectionBuildActionLinks(tab) {
459                 var div = $("#" + tab);
460                 var modify_link_ok = itemSelectionBuildEditLink(div);
461                 if (modify_link_ok) {
462                     $('.itemselection_actions', div).show();
463                 } else {
464                     $('.itemselection_actions', div).hide();
465                 }
466             }
467
468         $(document).ready(function() {
469             var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
470                 "sPaginationType": "full",
471                 "order": [[ 2, "asc" ]],
472                 "aoColumnDefs": [
473                     { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
474                     { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
475                 ]
476             }));
477
478             var csrlt = $("#closed table").dataTable($.extend(true, {}, dataTablesDefaults, {
479                 // FIXME sort function of additional_fields!
480                 "order": [[ 2, "asc" ]],
481                 "sPaginationType": "full",
482                 "aoColumnDefs": [
483                     { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
484                     { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
485                 ]
486             }));
487
488             var manarlt = $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
489                 "sPaginationType": "full",
490                 "aoColumnDefs": [
491                     { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
492                     { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
493                 ]
494             }));
495
496             osrlt.fnAddFilters("dt-filter", 750);
497             csrlt.fnAddFilters("dt-filter", 750);
498             manarlt.fnAddFilters("dt-filter", 750);
499
500             $('#serialstabs').tabs();
501             $("#reopensub").click(function(){
502                 return confirm(_("Are you sure you want to reopen this subscription?"));
503             });
504
505             $('.select-all, .clear-all').on('click', function(e) {
506                 e.preventDefault();
507                 var checkboxes = $(this).parents('form').find('input[type="checkbox"]');
508                 checkboxes.prop('checked', $(this).hasClass('select-all'));
509                 var tab = $(this).data("tab");
510                 itemSelectionBuildActionLinks(tab);
511             });
512
513             itemSelectionBuildActionLinks("opened");
514             itemSelectionBuildActionLinks("closed");
515             $("input[name='subscriptionid'][type='checkbox']").change(function() {
516                 var div = $(this).parents('form').parent().attr("id");
517                 itemSelectionBuildActionLinks(div);
518             });
519
520             [% IF ( mana ) %]
521                 $("label[for=callnumber], input#callnumber").hide();
522                 $("label[for=bookseller], input#bookseller").hide();
523                 $("label[for=branch], select#branch").hide();
524                 $("label[for=to], input#to").hide();
525                 $("label[for=location], select#location_filter").hide();
526                 [% FOR field IN additional_fields_for_subscription %]
527                       $("label[for=additional_field_[% field.id | $raw %]], input#additional_field_[% field.id | $raw %]").hide();
528                 [% END %]
529             [% END %]
530         });
531     </script>
532 [% END %]
533
534 [% INCLUDE 'intranet-bottom.inc' %]