Bug 15503: Grab Item Information from Order Files
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / admin / edi_accounts.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Administration &rsaquo; EDI accounts
3 [% IF acct_form %]
4   [% IF account %]
5      &rsaquo; Modify account
6   [% ELSE %]
7      &rsaquo; Add new account
8   [% END %]
9 [% END %]
10 [% IF delete_confirm %]
11      &rsaquo; Confirm deletion of account
12 [% END %]
13 </title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 </head>
16 <body id="admin_edi_acct" class="admin">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'cat-search.inc' %]
19
20 <div id="breadcrumbs">
21 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22 &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
23  [% IF acct_form %]
24   [% IF account %]
25      &rsaquo; <a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a> &rsaquo; Modify account
26   [% ELSE %]
27      &rsaquo; <a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a> &rsaquo; Add new account
28   [% END %]
29 [% ELSIF delete_confirm %]
30      &rsaquo; <a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a> &rsaquo; Confirm deletion of account
31 [% ELSE %]
32      &rsaquo; EDI accounts
33 [% END %]
34 </div>
35
36 <div id="doc3" class="yui-t2">
37
38 <div id="bd">
39 <div id="yui-main">
40 <div class="yui-b">
41 [% IF display %]
42     <div id="toolbar" class="btn-toolbar">
43     <a class="btn btn-default btn-sm" id="newediacct" href="/cgi-bin/koha/admin/edi_accounts.pl?op=acct_form">
44          <i class="fa fa-plus"></i>
45          New account
46     </a>
47     </div>
48 [% END %]
49
50 [% IF acct_form %]
51 <form action="/cgi-bin/koha/admin/edi_accounts.pl" name="Actform" method="post">
52   <input type="hidden" name="op" value="save" />
53   [% IF account %]
54   <input type="hidden" name="id" value="[% account.id %]" />
55   [% END %]
56   <fieldset class="rows">
57   <legend>
58   [% IF account %]
59      Modify account
60   [% ELSE %]
61     New account
62   [% END %]
63   </legend>
64
65   <ol>
66   <li>
67      <label for="vendor_id">Vendor: </label>
68      <select name="vendor_id" id="vendor_id">
69      [% FOREACH vendor IN vendors %]
70        [% IF account.vendor_id == vendor.id %]
71           <option value="[% vendor.id %]" selected="selected">[% vendor.name %]</option>
72        [% ELSE %]
73           <option value="[% vendor.id %]">[% vendor.name %]</option>
74        [% END %]
75      [% END %]
76      </select>
77   </li>
78   [% IF plugins_enabled %]
79   <li>
80      <label for="plugin">Plugin: </label>
81      <select name="plugin" id="plugin">
82         <option value="">Do not use plugin</option>
83         [% FOREACH plugin IN plugins %]
84             [% IF account.plugin == plugin.class %]
85                 <option value="[% plugin.class %]" selected="selected">[% plugin.metadata.name %]</option>
86             [% ELSE %]
87                 <option value="[% plugin.class %]">[% plugin.metadata.name %]</option>
88             [% END %]
89         [% END %]
90      </select>
91   </li>
92   [% ELSE %]
93   <input type="hidden" name="plugin" value="" />
94   [% END %]
95   <li>
96      <label for="description">Description: </label>
97      <input type="text" name="description" id="description" size="20" value="[% account.description %]" />
98   </li>
99   <li>
100      [% transport_types = [
101                  'FTP', 'SFTP', 'FILE'
102             ]
103      %]
104      <label for="transport">Transport: </label>
105      <select name="transport" title="valid types of transport are FTP and SFTP"
106       id="transport">
107       [% FOREACH transport_type IN transport_types %]
108            [% IF transport_type == account.transport %]
109               <option value="[% transport_type %]" selected="selected">[% transport_type %]</option>
110            [% ELSE %]
111               <option value="[% transport_type %]">[% transport_type %]</option>
112            [% END %]
113        [% END %]
114      </select>
115   </li>
116   <li>
117      <label for="host">Remote host: </label>
118      <input type="text" name="host" id="host" size="20" maxlength="40" value="[% account.host %]" />
119   </li>
120   <li>
121      <label for="username">Username: </label>
122      <input type="text" name="username" id="username" size="20" maxlength="40" value="[% account.username %]" />
123   </li>
124   <li>
125      <label for="password">Password: </label>
126      <input type="text" name="password" id="password" size="20" maxlength="40" value="[% account.password %]" />
127   </li>
128   <li>
129      <label for="download_directory">Download directory: </label>
130      <input type="text" name="download_directory" id="download_directory" size="20" value="[% account.download_directory %]" />
131         <div class="hint">The download directory specifies the directory on the ftp site from which quotes and invoices are downloaded.</div>
132   </li>
133   <li>
134      <label for="upload_directory">Upload directory: </label>
135      <input type="text" name="upload_directory" id="upload_directory" size="20" value="[% account.upload_directory %]" />
136         <div class="hint">The upload directory specifies the directory on the ftp site to which orders are uploaded.</div>
137   </li>
138   <li>
139      <label for="id_code_qualifier">Qualifier:</label>
140      <select name="id_code_qualifier" id="id_code_qualifier">
141      [% FOREACH qualifier IN code_qualifiers %]
142         [% IF qualifier.code == account.id_code_qualifier %]
143            <option value="[% qualifier.code %]" selected="selected">
144                [% qualifier.description %] ([% qualifier.code %])
145            </option>
146         [% ELSE %]
147            <option value="[% qualifier.code %]">
148               [% qualifier.description %] ([% qualifier.code %])
149            </option>
150         [% END %]
151      [% END %]
152    </select>
153   </li>
154   <li>
155      <label for="san">SAN: </label>
156      <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san %]" />
157   </li>
158   <li>
159      <label for="quotes_enabled">Quotes enabled: </label>
160       [% IF account.quotes_enabled %]
161      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="[% account.quotes_enabled %]" checked="checked" />
162       [% ELSE %]
163      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="[% account.quotes_enabled %]" />
164       [% END %]
165   </li>
166   <li>
167      <label for="orders_enabled">Orders enabled: </label>
168 [% IF account.orders_enabled %]
169      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="[% account.orders_enabled %]" checked="checked" />
170 [% ELSE %]
171      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="[% account.orders_enabled %]" />
172 [% END %]
173   </li>
174   <li>
175      <label for="invoices_enabled">Invoices enabled: </label>
176 [% IF account.invoices_enabled %]
177      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="[% account.invoices_enabled %]" checked="checked" />
178 [% ELSE %]
179      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="[% account.invoices_enabled %]" />
180 [% END %]
181   </li>
182   <li>
183      <label for="responses_enabled">Responses enabled: </label>
184 [% IF account.responses_enabled %]
185      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="[% account.responses_enabled %]" checked="checked" />
186 [% ELSE %]
187      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="[% account.responses_enabled %]" />
188 [% END %]
189   </li>
190   <li>
191      <label for="auto_orders">Automatic ordering: </label>
192 [% IF account.auto_orders %]
193      <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" checked="checked" />
194 [% ELSE %]
195      <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" />
196 [% END %]
197     <div class="hint">
198         With automatic ordering quotes generate orders without staff intervention.
199     </div>
200   </li>
201   </ol>
202   </fieldset>
203
204   <fieldset class="action">
205     <input type="submit" value="Submit" />
206     <a href="/cgi-bin/koha/admin/edi_accounts.pl" class="cancel">Cancel</a>
207   </fieldset>
208 </form>
209
210 [% END %]
211 [% IF delete_confirm %]
212 <div class="dialog alert">
213 <h3>Delete this account?</h3>
214 <table>
215     <tr>
216     <th>Vendor</th>
217     <td>[% account.vendor.name %]</td>
218     </tr>
219     <tr>
220     <th>Description</th>
221     <td>[% account.description %]</td>
222     </tr>
223     <tr>
224     <th>SAN</th>
225     <td>[% account.san %]</td>
226     </tr>
227 </table>
228 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="post">
229     <table>
230     </table>
231     <input type="hidden" name="op" value="delete_confirmed" />
232     <input type="hidden" name="id" value="[% account.id %]" />
233     <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
234 </form>
235 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="get">
236     <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
237 </form>
238 </div>
239 [% END %]
240 [% IF display %]
241 [% IF ( ediaccounts ) %]
242 <h2>Vendor EDI accounts</h2>
243
244     <table>
245     <tr>
246        <th>ID</th>
247        <th>Vendor</th>
248        <th>Description</th>
249        <th>Transport</th>
250        <th>Remote host</th>
251        <th>Username</th>
252        <th>Password</th>
253        <th>Download directory</th>
254        <th>Upload directory</th>
255        <th>Qualifier</th>
256        <th>SAN</th>
257        <th>Quotes</th>
258        <th>Orders</th>
259        <th>Invoices</th>
260        <th>Responses</th>
261        <th>Auto ordering</th>
262        <th>Actions</th>
263     </tr>
264     [% FOREACH account IN ediaccounts %]
265     <tr>
266       <td>[% account.id %]</td>
267       <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% account.vendor_id %]">[% account.vendor.name %]</a></td>
268       <td>[% account.description %]</td>
269       <td>[% account.transport %]</td>
270       <td>[% account.host %]</td>
271       <td>[% account.username %]</td>
272       <td>[% IF account.password %]*****[% END %]</td>
273       <td>[% account.download_directory %]</td>
274       <td>[% account.upload_directory %]</td>
275       <td>
276          [% FOREACH qualifier IN code_qualifiers %]
277             [% IF qualifier.code == account.id_code_qualifier %]
278                    [% qualifier.description %]
279             [% END %]
280          [% END %]
281          ([% account.id_code_qualifier %])
282      </td>
283       <td>[% account.san %]</td>
284       [% IF account.quotes_enabled %]
285          <td>Y</td>
286       [% ELSE %]
287          <td>N</td>
288       [% END %]
289       [% IF account.orders_enabled %]
290          <td>Y</td>
291       [% ELSE %]
292          <td>N</td>
293       [% END %]
294       [% IF account.invoices_enabled %]
295          <td>Y</td>
296       [% ELSE %]
297          <td>N</td>
298       [% END %]
299       [% IF account.responses_enabled %]
300          <td>Y</td>
301       [% ELSE %]
302          <td>N</td>
303       [% END %]
304       [% IF account.auto_orders %]
305          <td>Y</td>
306       [% ELSE %]
307          <td>N</td>
308       [% END %]
309       <td class="actions">
310           <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_accounts.pl?op=acct_form&id=[% account.id %]"><i class="fa fa-pencil"></i> Edit</a> <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/edi_accounts.pl?op=delete_confirm&id=[% account.id %]"><i class="fa fa-trash"></i> Delete</a>
311       </td>
312     </tr>
313     [% END %]
314     </table>
315     [% ELSE %]
316         <div class="dialog message">
317             There are no EDI accounts.
318         </div>
319     [% END %]
320 [% END %]
321
322 </div>
323 </div>
324 <div class="yui-b">
325     [% INCLUDE 'admin-menu.inc' %]
326 </div>
327 </div>
328 [% INCLUDE 'intranet-bottom.inc' %]