Bugzilla – Attachment 149498 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.25 KB, created by
Katrin Fischer
on 2023-04-11 21:13:38 UTC
(
hide
)
Description:
Bug 33104: Display the VENDOR_INTERFACE_TYPE AVs in the dropdown list
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-04-11 21:13:38 UTC
Size:
3.25 KB
patch
obsolete
>From c8e76442622a00814ab4840714537b2baa6372cb 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 > >Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com> >--- > .../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 45e4992072..431dc23fd4 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.30.2
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