Bug 30587: Fix acqui/supplier.tt translate issues
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / supplier.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% BLOCK edit_contact %]
5     <ol id="contact-form">
6         <input type="hidden" name="contact_id" value="[% contact.id | html %]" />
7         <li><label for="contact_name[% contact.id | html %]">Contact name: </label>
8             <input type="text" size="40" id="contact_name[% contact.id | html %]" name="contact_name" value="[% contact.name | html %]" /></li>
9         <li><label for="contact_position[% contact.id | html %]">Position: </label>
10             <input type="text" size="40" id="contact_position[% contact.id | html %]" name="contact_position" value="[% contact.position | html %]" /></li>
11         <li><label for="contact_phone[% contact.id | html %]">Phone: </label>
12                 <input type="text" size="20" id="contact_phone[% contact.id | html %]" name="contact_phone" value="[% contact.phone | html %]" /> </li>
13         <li><label for="contact_altphone[% contact.id | html %]">Alternative phone: </label>
14             <input type="text" size="20" id="contact_altphone[% contact.id | html %]" name="contact_altphone" value="[% contact.altphone | html %]" /></li>
15         <li><label for="contact_fax[% contact.id | html %]">Fax: </label>
16             <input type="text" size="20" id="contact_fax[% contact.id | html %]" name="contact_fax" value="[% contact.fax | html %]" /></li>
17         <li><label for="contact_email[% contact.id | html %]">Email: </label>
18             <input type="text" size="40" id="contact_email[% contact.id | html %]" name="contact_email" value="[% contact.email | html %]" class="email" /></li>
19         <li><label for="contact_notes[% contact.id | html %]">Notes: </label>
20             <textarea id="contact_notes[% contact.id | html %]" name="contact_notes" cols="40" rows="4">[% contact.notes | html %]</textarea></li>
21         <li><label for="contact_acqprimary[% contact.id | html %]">Primary acquisitions contact:</label>
22             [% IF contact.acqprimary %]
23                 <input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary" checked="checked"></input>
24             [% ELSE %]
25                 <input type="checkbox" id="contact_acqprimary[% contact.id | html %]" class="contact_acqprimary"></input>
26             [% END %]
27             <input type="hidden" class="contact_acqprimary_hidden" name="contact_acqprimary" value="[% contact.acqprimary | html %]"></input>
28         <li><label for="contact_serialsprimary[% contact.id | html %]">Primary serials contact:</label>
29             [% IF contact.serialsprimary %]
30                 <input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary" checked="checked"></input>
31             [% ELSE %]
32                 <input type="checkbox" id="contact_serialsprimary[% contact.id | html %]" class="contact_serialsprimary"></input>
33             [% END %]
34             <input type="hidden" class="contact_serialsprimary_hidden" name="contact_serialsprimary" value="[% contact.serialsprimary | html %]"></input>
35         <li><label for="contact_orderacquisition[% contact.id | html %]">Contact when ordering?</label>
36             [% IF contact.orderacquisition %]
37                 <input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition" checked="checked"></input>
38             [% ELSE %]
39                 <input type="checkbox" id="contact_orderacquisition[% contact.id | html %]" class="contact_orderacquisition"></input>
40             [% END %]
41             <input type="hidden" class="contact_orderacquisition_hidden" name="contact_orderacquisition" value="[% contact.orderacquisition | html %]"></input>
42         <li><label for="contact_claimacquisition[% contact.id | html %]">Contact about late orders?</label>
43             [% IF contact.claimacquisition %]
44                 <input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition" checked="checked"></input>
45             [% ELSE %]
46                 <input type="checkbox" id="contact_claimacquisition[% contact.id | html %]" class="contact_claimacquisition"></input>
47             [% END %]
48             <input type="hidden" class="contact_claimacquisition_hidden" name="contact_claimacquisition" value="[% contact.claimacquisition | html %]"></input>
49         <li><label for="contact_claimissues[% contact.id | html %]">Contact about late issues?</label>
50             [% IF contact.claimissues %]
51                 <input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues" checked="checked"></input>
52             [% ELSE %]
53                 <input type="checkbox" id="contact_claimissues[% contact.id | html %]" class="contact_claimissues"></input>
54             [% END %]
55             <input type="hidden" class="contact_claimissues_hidden" name="contact_claimissues" value="[% contact.claimissues | html %]"></input>
56         </li>
57         [% IF contact.id %]<li><button class="btn btn-default delete-contact"><i class="fa fa-trash"></i> Delete contact</li>[% END %]
58     </ol>
59 [% END %]
60
61 [% BLOCK show_contact %]
62     <h3>[% contact.name | html %]</h3>
63     <p><span class="label">Position: </span>[% contact.position | html %]</p>
64     <p><span class="label">Phone: </span>[% contact.phone | html %]</p>
65     <p><span class="label">Alternative phone: </span>[% contact.altphone | html %]</p>
66     <p><span class="label">Fax: </span>[% contact.fax | html %]</p>
67     [% IF ( contact.email ) %]
68         <p><span class="label">Email: </span><a href="mailto:[% contact.email | uri %]">[% contact.email | html %]</a></p>
69     [% END %]
70     [% IF ( contact.notes ) %]
71         <p><span class="label">Notes: </span>[% contact.notes | html %]</p>
72     [% END %]
73     [% IF ( contact.acqprimary ) %]
74         <p><span class="label">Primary acquisitions contact</span></p>
75     [% END %]
76     [% IF ( contact.serialsprimary ) %]
77         <p><span class="label">Primary serials contact</span></p>
78     [% END %]
79     [% IF ( contact.orderacquisition ) %]
80         <p><span class="label">Receives orders</span></p>
81     [% END %]
82     [% IF ( contact.claimacquisition ) %]
83         <p><span class="label">Receives claims for late orders</span></p>
84     [% END %]
85     [% IF ( contact.claimissues ) %]
86         <p><span class="label">Receives claims for late issues</span></p>
87     [% END %]
88 [% END %]
89
90 [% SET footerjs = 1 %]
91 [% INCLUDE 'doc-head-open.inc' %]
92 <title>Vendor [% name | html %] &rsaquo; Koha</title>
93 [% INCLUDE 'doc-head-close.inc' %]
94 </head>
95
96 <body id="acq_supplier" class="acq">
97 [% INCLUDE 'header.inc' %]
98 [% INCLUDE 'acquisitions-search.inc' %]
99
100 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
101     <ol>
102         <li>
103             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
104         </li>
105         <li>
106             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
107         </li>
108         [% IF ( enter ) %]
109             [% IF ( booksellerid ) %]
110                 <li>
111                     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a>
112                 </li>
113                 <li>
114                     <a href="#" aria-current="page">
115                         Update: [% name | html %]
116                     </a>
117                 </li>
118             [% ELSE %]
119                 <li>
120                     <a href="#" aria-current="page">
121                         Add vendor
122                     </a>
123                 </li>
124             [% END %]
125         [% ELSE %]
126             <li>
127                 <a href="#" aria-current="page">
128                     [% name | html %]
129                 </a>
130             </li>
131         [% END %]
132     </ol>
133 </nav>
134
135 <div class="main container-fluid">
136     <div class="row">
137         <div class="col-sm-10 col-sm-push-2">
138             <main>
139
140     [% IF ( enter ) %]
141         [% IF ( booksellerid ) %]
142         <h1>Update: [% name | html %]</h1>
143     [% ELSE %]
144         <h1>Add vendor</h1>
145     [% END %]
146     [% END %]
147 [% UNLESS ( enter ) %][% INCLUDE 'acquisitions-toolbar.inc' %][% END %]
148 [% IF ( enter ) %]
149     <form action="updatesupplier.pl" name="updatesupplier" style="display:block" class="validated" method="post">
150         <div id="toolbar" class="btn-toolbar">
151             <button class="btn btn-default" type="submit"><i class="fa fa-save"></i> Save</button>
152             [% IF ( booksellerid ) %]
153                 <a class="btn btn-default cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">
154             [% ELSE %]
155                 <a class="btn btn-default cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
156             [% END %] <i class="fa fa-remove"></i> Cancel</a>
157         </div>
158
159         <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
160         <fieldset class="rows">
161             <legend>Company details</legend>
162             <ol><li><label for="company" class="required">Name:</label>
163                 <input type="text" size="40" id="company" name="company" value="[% name | html %]" required="required" class="required focus" /><span class="required">Required</span></li>
164             <li><label for="company_postal">Postal address: </label>
165                     <textarea id="company_postal" name="company_postal" cols="40" rows="3">[% postal | html %]</textarea></li>
166             <li><label for="physical">Physical address: </label>
167                 <textarea id="physical" name="physical" cols="40" rows="3">[% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]</textarea></li>
168             <li><label for="company_phone">Phone: </label>
169                 <input type="text" size="20" id="company_phone" name="company_phone" value="[% phone | html %]" /></li>
170             <li><label for="company_fax">Fax: </label>
171                 <input type="text" size="20" id="company_fax" name="company_fax" value="[% fax | html %]" /></li>
172             <li><label for="website">Website: </label>
173                 <input type="text" size="40" id="website" name="website" value="[% url | html %]" class="url" /></li>
174             <li><label for="accountnumber">Account number: </label>
175                 <input type="text" size="40" id="accountnumber" name="accountnumber" value="[% accountnumber | html %]" /></li></ol>
176         </fieldset>
177         <fieldset class="rows">
178             <legend>Contacts</legend>
179             <fieldset id="contact-template" class="supplier-contact">
180                 <legend>Contact details</legend>
181                 [% INCLUDE edit_contact %]
182             </fieldset>
183             [% FOREACH contact IN contacts %]
184                 <fieldset class="supplier-contact">
185                     <legend>Contact details</legend>
186                     [% INCLUDE edit_contact %]
187                 </fieldset>
188             [% END %]
189             <button id="add-contact" class="btn btn-default"><i class="fa fa-plus"></i> Add another contact</button>
190         </fieldset>
191
192         <fieldset class="rows">
193             <legend>Ordering information</legend>
194             <ol><li><label for="activestatus">Vendor is:</label>
195                     [% IF ( active ) %]
196                         <label class="radio" for="activestatus">
197                             Active <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
198                         </label>
199                         <label class="radio" for="inactivestatus">
200                             Inactive <input type="radio" id="inactivestatus" name="status" value="0" />
201                         </label>
202                     [% ELSE %]
203                         <label class="radio" for="activestatus">
204                             Active <input type="radio" id="activestatus" name="status" value="1" />
205                         </label>
206                         <label class="radio" for="inactivestatus">
207                             Inactive <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
208                         </label>
209                     [% END %]</li>
210             <li><label for="list_currency">List prices are: </label>
211                 <select name="list_currency" id="list_currency">
212                     [% FOREACH c IN currencies %]
213                         [% IF booksellerid and c.currency == listprice or not booksellerid and c.active %]
214                             <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
215                         [% ELSIF not c.archived %]
216                             <option value="[% c.currency | html %]">[% c.currency | html %]</option>
217                         [% END %]
218                     [% END %]
219                 </select>
220             </li>
221             <li><label for="invoice_currency">Invoice prices are: </label>
222                 <select name="invoice_currency" id="invoice_currency">
223                     [% FOREACH c IN currencies %]
224                         [% IF booksellerid and c.currency == invoiceprice or not booksellerid and c.active %]
225                             <option value="[% c.currency | html %]" selected="selected">[% c.currency | html %]</option>
226                         [% ELSIF not c.archived %]
227                             <option value="[% c.currency | html %]">[% c.currency | html %]</option>
228                         [% END %]
229                     [% END %]
230                 </select>
231             </li>
232             <li><label for="gstyes">Tax number registered:</label>
233                 [% IF ( gstreg ) %]
234                     <label class="radio" for="gstyes">
235                         Yes <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
236                     </label>
237                     <label class="radio" for="gstno">
238                         No <input type="radio" name="gst" id="gstno" value="0" />
239                     </label>
240                 [% ELSE %]
241                     <label class="radio" for="gstyes">
242                         Yes <input type="radio" name="gst" id="gstyes" value="1" />
243                     </label>
244                     <label class="radio" for="gstno">
245                         No <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
246                     </label>
247                 [% END %]</li>
248
249             <li><label for="list_gstyes">List prices:</label>
250                 [% IF ( listincgst ) %]
251                     <label class="radio" for="list_gstyes">
252                         Include tax <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
253                     </label>
254                     <label class="radio" for="list_gstno">
255                         Don't include tax <input type="radio" id="list_gstno" name="list_gst" value="0" />
256                     </label>
257                 [% ELSE %]
258                     <label class="radio" for="list_gstyes">
259                         Include tax <input type="radio" id="list_gstyes" name="list_gst" value="1" />
260                     </label>
261                     <label class="radio" for="list_gstno">
262                         Don't include tax <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
263                     </label>
264                 [% END %]</li>
265
266             <li><label for="invoice_gstyes">Invoice prices:</label>
267                 [% IF ( invoiceincgst ) %]
268                     <label class="radio" for="invoice_gstyes">
269                         Include tax <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
270                     </label>
271                     <label class="radio" for="invoice_gstno">
272                         Don't include tax <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
273                     </label>
274                     [% ELSE %]
275                     <label class="radio" for="invoice_gstyes">
276                         Include tax <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
277                     </label>
278                     <label class="radio" for="invoice_gstno">
279                         Don't include tax <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
280                     </label>
281                 [% END %]</li>
282
283             [% IF gst_values %]
284                 <li>
285                   <label for="tax_rate">Tax rate: </label>
286                   <select name="tax_rate" id="tax_rate">
287                   [% FOREACH gst IN gst_values %]
288                     [% IF ( tax_rate == gst.option ) %]
289                       <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %] %</option>
290                     [% ELSE %]
291                       <option value="[% gst.option | html %]">[% gst.option * 100 | html %] %</option>
292                     [% END %]
293                   [% END %]
294                   </select>
295                 </li>
296             [% ELSE %]
297                 <input type="hidden" name="tax_rate" value="0" />
298             [% END %]
299             <li><label for="discount">Discount: </label>
300                 <input type="text" size="6" id="discount" name="discount" value="[% discount | format ('%.1f') %]" />%</li>
301             <li>
302                 <label for="deliverytime">Delivery time: </label>
303                 <input type="text" size="2" id="deliverytime" name="deliverytime" value="[% deliverytime | html %]" /> days
304             </li>
305             <li><label for="notes">Notes: </label>
306                 <textarea cols="40" rows="4" id="notes" name="notes" >[% notes | html %]</textarea></li>
307             </ol>
308         </fieldset>
309         <fieldset class="action"><input type="submit" value="Save" /> [% IF ( booksellerid ) %]
310         <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% ELSE %]<a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
311         [% END %]Cancel</a></fieldset>
312
313     </form>
314 [% ELSE %]
315     <h1>[% name | html %]</h1>
316         <div class="row">
317             <div id="supplier-company-details" class="col-sm-6">
318                 <h2>Vendor details</h2>
319                 <p><span class="label">Company name: </span>[% name | html %]</p>
320                 <p><span class="label">Postal address: </span>[% postal | html %]</p>
321                 <p><span class="label">Physical address: </span>[% address1 | html %][% address2 | html %][% address3 | html %][% address4 | html %]</p>
322                 <p><span class="label">Phone: </span>[% phone | html %]</p>
323                 <p><span class="label">Fax: </span>[% fax | html %]</p>
324                 [% IF ( url ) %]
325                     <p><span class="label">Website: </span><a href="[% url | url %]">[% url | html %]</a></p>
326                 [% END %]
327                 [% IF ( accountnumber ) %]
328                     <p><span class="label">Account number: </span>[% accountnumber | html %]</p>
329                 [% END %]
330
331             <div id="supplier-ordering-information">
332             <h2>Ordering information</h2>
333                 <p><strong>Vendor is: </strong>
334                         [% IF ( active ) %]
335                             Active
336                         [% ELSE %]
337                             Inactive
338                         [% END %]</p>
339                 <p><strong>List prices are: </strong>[% listprice | html %]</p>
340                 <p><strong>Invoice prices are: </strong>[% invoiceprice | html %]</p>
341                 [% IF ( tax_rate ) %]<p><strong>Tax number registered: </strong>
342                         [% IF ( gstreg ) %]Yes[% ELSE %]No[% END %]</p>
343                 <p><strong>List item price includes tax: </strong>
344                         [% IF ( listincgst ) %]Yes[% ELSE %]No[% END %]</p>
345                 <p><strong>Invoice item price includes tax: </strong>
346                         [% IF ( invoiceincgst ) %]Yes[% ELSE %]No[% END %]</p>[% END %]
347                 <p><strong>Discount: </strong>
348                     [% discount | format("%.1f") %] %</p>
349                 <p><strong>Tax rate: </strong>
350                     [% ( tax_rate || 0 ) * 100 | html %] %</p>
351                 [% IF deliverytime.defined %]
352                     <p><strong>Delivery time: </strong>
353                         [% deliverytime | html %] days</p>
354                 [% END %]
355                 [% IF ( notes ) %]<p><strong>Notes: </strong>
356                     [% notes | html %]</p>[% END %]
357             </div> <!-- .supplier-ordering-information -->
358             </div> <!-- /.col-sm-6 -->
359
360             <div class="col-sm-6">
361                 <div class="supplier-contact-details">
362                     <h2>Contact</h2>
363                     [% FOREACH contact IN contacts %]
364                         [% INCLUDE show_contact %]
365                     [% END %]
366                 </div>
367
368                 <div class="subscription-details">
369                     <h2>Subscription details</h2>
370                     <p><strong>Number of subscriptions: </strong>
371                         [% IF (  CAN_user_serials ) %]
372                             <a href="/cgi-bin/koha/serials/serials-search.pl?bookseller_filter=[% name | uri %]&searched=1">[% subscriptioncount | html %]</a>
373                         [% ELSE %]
374                             [% subscriptioncount | html %]
375                         [% END %]
376                     </p>
377                 </div>
378
379             </div>
380
381         </div>
382
383         [% IF ( contracts ) %]
384             <div id="supplier-contracts">
385                 <h2>Contract(s)</h2>
386                 <table id="contractst">
387                   <thead>
388                     <tr>
389                         <th scope="col">Name</th>
390                         <th scope="col">Description</th>
391                         <th scope="col">Start date</th>
392                         <th scope="col">End date</th>
393                         [% IF CAN_user_acquisition_contracts_manage %]
394                             <th scope="col" class="NoSort noExport">Actions</th>
395                         [% END %]
396                     </tr>
397                   </thead>
398                   <tbody>
399                     [% FOREACH contract IN contracts %]
400                         <tr>
401                         <td>
402                             <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber | uri %]&amp;booksellerid=[% contract.booksellerid | uri %]">[% contract.contractname | html %]</a>
403                         </td>
404                         <td>[% contract.contractdescription | html %]</td>
405                         <td data-order="[% contract.contractstartdate | html %]">[% contract.contractstartdate | $KohaDates %]</td>
406                         <td data-order="[% contract.contractenddate | html %]">[% contract.contractenddate | $KohaDates %]</td>
407                         [% IF CAN_user_acquisition_contracts_manage %]
408                             <td class="actions">
409                                 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% contract.contractnumber | html %]&amp;booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-pencil"></i> Edit</a>
410                                 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&amp;contractnumber=[% contract.contractnumber | html %]&amp;booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-trash"></i> Delete</a>
411                             </td>
412                         [% END %]
413                         </tr>
414                     [% END %]
415                   </tbody>
416                 </table>
417             </div>
418         [% END %]
419
420 [% END %]
421
422 </main>
423 </div> <!-- /.col-sm-10.col-sm-push-2 -->
424
425 <div class="col-sm-2 col-sm-pull-10">
426     <aside>
427         [% INCLUDE 'vendor-menu.inc' %]
428     </aside>
429 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
430 </div> <!-- /.row -->
431 [% MACRO jsinclude BLOCK %]
432     [% Asset.js("js/acquisitions-menu.js") | $raw %]
433     [% Asset.js("lib/hc-sticky.js") | $raw %]
434     [% INCLUDE 'datatables.inc' %]
435     <script>
436         function confirm_deletion() {
437             if (confirm(_("Confirm deletion of this vendor ?"))) {
438                 window.location="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]&op=delete";
439             }
440         }
441
442         function add_contact() {
443             var new_contact = $('#contact-template').clone();
444             var timestamp = new Date().getTime();
445             $(new_contact).removeAttr('id');
446             $('input, textarea', new_contact).each(function () {
447                 $(this).attr('id', $(this).attr('id') + '_' + timestamp);
448             });
449             $('label', new_contact).each(function () {
450                 $(this).attr('for', $(this).attr('for') + '_' + timestamp);
451             });
452             $(new_contact).insertBefore(this);
453             if ($('.supplier-contact').length === 2) { // First contact
454                 $.each(['.contact_acqprimary', '.contact_serialsprimary', '.contact_orderacquisition', '.contact_claimacquisition', '.contact_claimissues'], function (idx, checkbox) {
455                     $(checkbox, new_contact).click();
456                 });
457             }
458             $('input[name="contact_name"]', new_contact).focus();
459             return false;
460         }
461
462         function delete_contact(ev) {
463             $(this).parents('.supplier-contact').remove();
464             ev.preventDefault();
465         }
466
467         var Sticky;
468
469          $(document).ready(function() {
470             var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, {
471                 "aoColumnDefs": [
472                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }
473                 ],
474                 'sDom': 't'
475             } ) );
476             $('body').on('click', '.delete-contact', null, delete_contact);
477             $('#add-contact').click(add_contact);
478             $('body').on('click', '.contact_acqprimary', null, function () {
479                 if ($(this).is(':checked')) {
480                     $('.contact_acqprimary').filter(':checked').not(this).prop('checked', false);
481                     $('.contact_acqprimary_hidden').each(function () {
482                         $(this).val('0');
483                     });
484                 }
485                 $(this).next('.contact_acqprimary_hidden').val('1');
486             });
487             $('body').on('click', '.contact_serialsprimary', null, function () {
488                 if ($(this).is(':checked')) {
489                     $('.contact_serialsprimary').filter(':checked').not(this).prop('checked', false);
490                     $('.contact_serialsprimary_hidden').each(function () {
491                         $(this).val('0');
492                     });
493                 }
494                 $(this).next('.contact_serialsprimary_hidden').val($(this).is(':checked') ? '1' : '0');
495             });
496             $('body').on('click', '.contact_orderacquisition', null, function () {
497                 $(this).next('.contact_orderacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
498             });
499             $('body').on('click', '.contact_claimacquisition', null, function () {
500                 $(this).next('.contact_claimacquisition_hidden').val($(this).is(':checked') ? '1' : '0');
501             });
502             $('body').on('click', '.contact_claimissues', null, function () {
503                 $(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0');
504             });
505
506             Sticky = $("#toolbar");
507             Sticky.hcSticky({
508                 stickTo: "main",
509                 stickyClass: "floating"
510             });
511         });
512     </script>
513 [% END %]
514
515 [% INCLUDE 'intranet-bottom.inc' %]