Lines 1-4
Link Here
|
1 |
[% USE raw %] |
1 |
[% USE raw %] |
|
|
2 |
[% USE To %] |
2 |
[% USE Asset %] |
3 |
[% USE Asset %] |
3 |
[% USE KohaDates %] |
4 |
[% USE KohaDates %] |
4 |
[% BLOCK edit_contact %] |
5 |
[% BLOCK edit_contact %] |
Lines 180-185
Link Here
|
180 |
<label for="vendor_type">Vendor type: </label> |
181 |
<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 |
[% PROCESS 'av-build-dropbox.inc' name="vendor_type", category="VENDOR_TYPE", default=type, empty=1, size = 20 %] |
182 |
</li> |
183 |
</li> |
|
|
184 |
<li> |
185 |
<label for="aliases">Aliases: </label> |
186 |
<div id="aliases" style="padding-left: 11rem;"></div> |
187 |
</li> |
188 |
|
183 |
</ol> |
189 |
</ol> |
184 |
</fieldset> |
190 |
</fieldset> |
185 |
<fieldset class="rows"> |
191 |
<fieldset class="rows"> |
Lines 318-323
Link Here
|
318 |
[% IF ( accountnumber ) %] |
324 |
[% IF ( accountnumber ) %] |
319 |
<p><span class="label">Account number: </span>[% accountnumber | html %]</p> |
325 |
<p><span class="label">Account number: </span>[% accountnumber | html %]</p> |
320 |
[% END %] |
326 |
[% END %] |
|
|
327 |
[% IF vendor.aliases.count %] |
328 |
<p> |
329 |
<span class="label">Aliases: </span> |
330 |
<ul> |
331 |
[% FOR alias IN vendor.aliases %] |
332 |
<li>[% alias.alias | html %]</li> |
333 |
[% END %] |
334 |
</ul> |
335 |
</p> |
336 |
[% END %] |
321 |
</div> <!-- /#supplier-company-details --> |
337 |
</div> <!-- /#supplier-company-details --> |
322 |
|
338 |
|
323 |
<div id="supplier-ordering-information" class="page-section"> |
339 |
<div id="supplier-ordering-information" class="page-section"> |
Lines 448-453
Link Here
|
448 |
ev.preventDefault(); |
464 |
ev.preventDefault(); |
449 |
} |
465 |
} |
450 |
|
466 |
|
|
|
467 |
[% IF vendor %] |
468 |
let aliases = [% To.json(vendor.aliases.unblessed) | $raw %]; |
469 |
[% ELSE %] |
470 |
let aliases = []; |
471 |
[% END %] |
472 |
function remove_alias(i){ |
473 |
aliases.splice(i, 1); |
474 |
refresh_aliases(); |
475 |
} |
476 |
function add_alias(){ |
477 |
let alias = $("#new_alias").val(); |
478 |
if ( !alias.length > 0 ) { return } |
479 |
aliases.push({alias}); |
480 |
refresh_aliases(); |
481 |
} |
482 |
function refresh_aliases(){ |
483 |
let nodes = $("<div></div>"); |
484 |
aliases.forEach((a, i) => { |
485 |
let n = $("<div></div>").append(a.alias); |
486 |
n.append(`<input type="hidden" name="alias" value="${a.alias}">`) |
487 |
n.append(`<a onclick="remove_alias(${i});"><i class="fa fa-trash" aria-hidden="true"></i></a>`); |
488 |
nodes.append(n); |
489 |
}); |
490 |
nodes.append("<input id='new_alias' type='text' />"); |
491 |
nodes.append(`<a onclick="add_alias();"><i class="fa fa-plus" aria-hidden="true"></i></a>`); |
492 |
$("#aliases").html(nodes.html()); |
493 |
} |
494 |
|
451 |
var Sticky; |
495 |
var Sticky; |
452 |
|
496 |
|
453 |
$(document).ready(function() { |
497 |
$(document).ready(function() { |
Lines 487-492
Link Here
|
487 |
$(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0'); |
531 |
$(this).next('.contact_claimissues_hidden').val($(this).is(':checked') ? '1' : '0'); |
488 |
}); |
532 |
}); |
489 |
|
533 |
|
|
|
534 |
refresh_aliases(); |
535 |
|
490 |
Sticky = $("#toolbar"); |
536 |
Sticky = $("#toolbar"); |
491 |
Sticky.hcSticky({ |
537 |
Sticky.hcSticky({ |
492 |
stickTo: "main", |
538 |
stickTo: "main", |
493 |
- |
|
|