View | Details | Raw Unified | Return to bug 33104
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt (-3 / +10 lines)
Lines 373-379 Link Here
373
                            <legend>[% i.name | html %]</legend>
373
                            <legend>[% i.name | html %]</legend>
374
                            <ul>
374
                            <ul>
375
                                [% IF i.type %]
375
                                [% IF i.type %]
376
                                    <li>Type: [% i.type | html %]</li>
376
                                    <li>Type: [% AuthorisedValues.GetByCode( 'VENDOR_INTERFACE_TYPE', i.type) | html %]</li>
377
                                [% END %]
377
                                [% END %]
378
                                [% IF i.uri %]
378
                                [% IF i.uri %]
379
                                    <li>URI: [% i.uri | html %]</li>
379
                                    <li>URI: [% i.uri | html %]</li>
Lines 588-593 Link Here
588
            });
588
            });
589
            refresh_interfaces();
589
            refresh_interfaces();
590
        }
590
        }
591
        let av_select = {
592
            VENDOR_INTERFACE_TYPE: $("[% PROCESS 'av-build-dropbox.inc', category="VENDOR_INTERFACE_TYPE" empty=1 | replace('\n', '') | replace('"', '\"') %]"),
593
        };
591
        function refresh_interfaces(){
594
        function refresh_interfaces(){
592
            let nodes = $("<div id='interfaces'></div>");
595
            let nodes = $("<div id='interfaces'></div>");
593
            interfaces.forEach((interface, i) => {
596
            interfaces.forEach((interface, i) => {
Lines 597-603 Link Here
597
                let ol = $('<ol class="interface-form"></ol>');
600
                let ol = $('<ol class="interface-form"></ol>');
598
                let attributes = [
601
                let attributes = [
599
                    { label: _("Name"),          name: 'name',          node: 'input' },
602
                    { label: _("Name"),          name: 'name',          node: 'input' },
600
                    { label: _("Type"),          name: 'type',          node: 'input' },
603
                    { label: _("Type"),          name: 'type',          node: 'av_select', av_cat: 'VENDOR_INTERFACE_TYPE' },
601
                    { label: _("URI"),           name: 'uri',           node: 'input' },
604
                    { label: _("URI"),           name: 'uri',           node: 'input' },
602
                    { label: _("Login"),         name: 'login',         node: 'input' },
605
                    { label: _("Login"),         name: 'login',         node: 'input' },
603
                    { label: _("Password"),      name: 'password',      node: 'input' },
606
                    { label: _("Password"),      name: 'password',      node: 'input' },
Lines 611-616 Link Here
611
                        li.append(`<input type="text" size="40" id="interface_${attribute.name}_${i}" name="interface_${attribute.name}_${i}" value="${interface[attribute.name]}" />`);
614
                        li.append(`<input type="text" size="40" id="interface_${attribute.name}_${i}" name="interface_${attribute.name}_${i}" value="${interface[attribute.name]}" />`);
612
                    } else if ( attribute.node == 'textarea' ) {
615
                    } else if ( attribute.node == 'textarea' ) {
613
                        li.append(`<textarea cols="40" rows="3" id="interface_${attribute.name}_${i}" name="interface_${attribute.name}_${i}">${interface[attribute.name]}</textarea>`);
616
                        li.append(`<textarea cols="40" rows="3" id="interface_${attribute.name}_${i}" name="interface_${attribute.name}_${i}">${interface[attribute.name]}</textarea>`);
617
                    } else if ( attribute.node == 'av_select' ) {
618
                        let select = av_select[attribute.av_cat].clone();
619
                        select.attr('name', `interface_${attribute.name}_${i}`);
620
                        select.find(`option[value='${interface[attribute.name]}']`).prop("selected", true);
621
                        li.append(select);
614
                    }
622
                    }
615
                    ol.append(li);
623
                    ol.append(li);
616
                });
624
                });
617
- 

Return to bug 33104