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