1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/acq/financial/list_providers.js'> </script>
4 <div id='oils-acq-list-header' class='container'>
5 <div id='oils-acq-list-header-label'>Providers</div>
8 <div class='oils-acq-actions-div'>
9 <div dojoType="dijit.form.DropDownButton">
10 <span>New Provider</span>
12 <div dojoType="dijit.TooltipDialog" execute="createProvider(arguments[0]);">
13 <script type='dojo/connect' event='onOpen'>
14 openils.acq.CurrencyType.loadSelectWidget(providerCurrencySelector);
15 new openils.User().buildPermOrgSelector('ADMIN_PROVIDER', providerOwnerSelect);
18 <table class='dijitTooltipTable'>
20 <td><label for="name">Name: </label></td>
21 <td><input dojoType="dijit.form.TextBox" name="name"></td>
24 <td><label for="code">Code: </label></td>
25 <td><input dojoType="dijit.form.TextBox" name="code"></td>
28 <td><label for="currency_type">Currency Type:</label></td>
30 <input jsId='providerCurrencySelector' name="currency_type"
31 dojoType="dijit.form.FilteringSelect" searchAttr='code' labelAttr='code'>
36 <td valign='top'><label for="owner">Owning Location:</label></td>
38 <input dojoType="openils.widget.OrgUnitFilteringSelect" jsId='providerOwnerSelect'
39 searchAttr="shortname" name="owner" autocomplete="true" labelAttr='shortname'> </input>
43 <td colspan='2' align='center'>
44 <button dojoType=dijit.form.Button type="submit">Create</button>
55 <!-- The main grid lives here -->
57 function getName(rowIndex) {
58 data = providerListGrid.model.getRow(rowIndex);
60 return '<a href="[% ctx.base_uri %]/acq/provider/view/'+data.id+'">'+data.name+'</a>';
63 var providerGridStructure = [{
65 {name: 'ID', field: 'id'},
66 {name: 'Name', get:getName, width:'auto'},
67 {name: 'Code', field:'code'},
68 {name: 'Owner', get:getOrgInfo},
69 {name: 'Currency Type', field: "currency_type"}
73 <div jsId='providerListGrid' dojoType="dojox.Grid" structure='providerGridStructure'></div>