Bugzilla – Attachment 148465 Details for
Bug 33104
Add vendor interfaces
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the dropdown list
Bug-33104-Display-the-VENDORINTERFACETYPE-AVs-in-t.patch (text/plain), 3.20 KB, created by
Jonathan Druart
on 2023-03-21 13:12:25 UTC
(
hide
)
Description:
Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the dropdown list
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-21 13:12:25 UTC
Size:
3.20 KB
patch
obsolete
>From 6ce351652a037457e373dceb27bc0b606159e423 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Mar 2023 14:40:42 +0100 >Subject: [PATCH] Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the > dropdown list > >--- > .../intranet-tmpl/prog/en/modules/acqui/supplier.tt | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >index a9cf47f255b..70fe1818ae3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >@@ -373,7 +373,7 @@ > <legend>[% i.name | html %]</legend> > <ul> > [% IF i.type %] >- <li>Type: [% i.type | html %]</li> >+ <li>Type: [% AuthorisedValues.GetByCode( 'VENDOR_INTERFACE_TYPE', i.type) | html %]</li> > [% END %] > [% IF i.uri %] > <li>URI: [% i.uri | html %]</li> >@@ -588,6 +588,9 @@ > }); > refresh_interfaces(); > } >+ let av_select = { >+ VENDOR_INTERFACE_TYPE: $("[% PROCESS 'av-build-dropbox.inc', category="VENDOR_INTERFACE_TYPE" empty=1 | replace('\n', '') | replace('"', '\"') %]"), >+ }; > function refresh_interfaces(){ > let nodes = $("<div id='interfaces'></div>"); > interfaces.forEach((interface, i) => { >@@ -597,7 +600,7 @@ > let ol = $('<ol class="interface-form"></ol>'); > let attributes = [ > { label: _("Name"), name: 'name', node: 'input' }, >- { label: _("Type"), name: 'type', node: 'input' }, >+ { label: _("Type"), name: 'type', node: 'av_select', av_cat: 'VENDOR_INTERFACE_TYPE' }, > { label: _("URI"), name: 'uri', node: 'input' }, > { label: _("Login"), name: 'login', node: 'input' }, > { label: _("Password"), name: 'password', node: 'input' }, >@@ -611,6 +614,11 @@ > li.append(`<input type="text" size="40" id="interface_${attribute.name}_${i}" name="interface_${attribute.name}_${i}" value="${interface[attribute.name]}" />`); > } else if ( attribute.node == 'textarea' ) { > li.append(`<textarea cols="40" rows="3" id="interface_${attribute.name}_${i}" name="interface_${attribute.name}_${i}">${interface[attribute.name]}</textarea>`); >+ } else if ( attribute.node == 'av_select' ) { >+ let select = av_select[attribute.av_cat].clone(); >+ select.attr('name', `interface_${attribute.name}_${i}`); >+ select.find(`option[value='${interface[attribute.name]}']`).prop("selected", true); >+ li.append(select); > } > ol.append(li); > }); >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33104
:
147632
|
147633
|
147634
|
147635
|
147636
|
147637
|
147638
|
147639
|
148459
|
148460
|
148461
|
148462
|
148463
|
148464
|
148465
|
148466
|
148473
|
148474
|
148475
|
148476
|
148477
|
148478
|
148479
|
148480
|
149375
|
149420
|
149421
|
149422
|
149431
|
149492
|
149493
|
149494
|
149495
|
149496
|
149497
|
149498
|
149499
|
149500
|
149501
|
149502
|
149503
|
149631
|
149632