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