Bug 7736: Support Ordering via Edifact EDI messages
[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      &rsquo; Modify account
6   [% ELSE %]
7      &rsquo; Add new account
8   [% END %]
9 [% END %]
10 [% IF delete_confirm %]
11      &rsquo; 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  &rsaquo; <a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a>
24 [% IF acct_form %]
25   [% IF account %]
26      &rsaquo; Modify account
27   [% ELSE %]
28      &rsaquo; Add new account
29   [% END %]
30 [% ELSIF delete_confirm %]
31      &rsaquo; Confirm deletion of account
32 [% ELSE %]
33      &rsaquo; Accounts
34 [% END %]
35 </div>
36
37 <div id="doc3" class="yui-t2">
38
39 <div id="bd">
40 <div id="yui-main">
41 <div class="yui-b">
42 [% IF display %]
43     <div id="toolbar" class="btn-toolbar">
44     <a class="btn btn-small" id="newediacct" href="/cgi-bin/koha/admin/edi_accounts.pl?op=acct_form">
45          <i class="icon-plus"></i>
46          New account
47     </a>
48     </div>
49 [% END %]
50
51 [% IF acct_form %]
52 <form action="/cgi-bin/koha/admin/edi_accounts.pl" name="Actform" method="post">
53   <input type="hidden" name="op" value="save" />
54   [% IF account %]
55   <input type="hidden" name="id" value="[% account.id %]" />
56   [% END %]
57   <fieldset class="rows">
58   <legend>
59   [% IF account %]
60      Modify account
61   [% ELSE %]
62     New account
63   [% END %]
64   </legend>
65
66   <ol>
67   <li>
68      <label for="vendor_id">Vendor: </label>
69      <select name="vendor_id" id="vendor_id">
70      [% FOREACH vendor IN vendors %]
71        [% IF account.vendor_id == vendor.id %]
72           <option value="[% vendor.id %]" selected="selected">[% vendor.name %]</option>
73        [% ELSE %]
74           <option value="[% vendor.id %]">[% vendor.name %]</option>
75        [% END %]
76      [% END %]
77      </select>
78   </li>
79   <li>
80      <label for="description">Description: </label>
81      <input type="text" name="description" id="description" size="20" maxlength="90" value="[% account.description %]" />
82   </li>
83   <li>
84      [% transport_types = [
85                  'FTP', 'SFTP', 'FILE'
86             ]
87      %]
88      <label for="transport">Transport: </label>
89      <select name="transport" title="valid types of transport are FTP and SFTP"
90       id="transport">
91       [% FOREACH transport_type IN transport_types %]
92            [% IF transport_type == account.transport %]
93               <option value="[% transport_type %]" selected="selected">[% transport_type %]</option>
94            [% ELSE %]
95               <option value="[% transport_type %]">[% transport_type %]</option>
96            [% END %]
97        [% END %]
98      </select>
99   </li>
100   <li>
101      <label for="host">Remote host: </label>
102      <input type="text" name="host" id="host" size="20" maxlength="90" value="[% account.host %]" />
103   </li>
104   <li>
105      <label for="username">Username: </label>
106      <input type="text" name="username" id="username" size="20" maxlength="90" value="[% account.username %]" />
107   </li>
108   <li>
109      <label for="password">Password: </label>
110      <input type="text" name="password" id="password" size="20" maxlength="90" value="[% account.password %]" />
111   </li>
112   <li>
113      <label for="download_directory">Download directory: </label>
114      <input type="text" name="download_directory" id="download_directory" size="20" maxlength="90"
115       title="The download directory specifies the directory on the ftpsite from which we download quotes and invoices"
116       value="[% account.download_directory %]" />
117   </li>
118   <li>
119      <label for="upload_directory">Upload directory: </label>
120      <input type="text" name="upload_directory" id="upload_directory" size="20" maxlength="90"
121       title="The upload directory specifies the directory on the ftp site to which we upload orders"
122       value="[% account.upload_directory %]" />
123   </li>
124   <li>
125      <label for="id_code_qualifier">Qualifier:</label>
126      <select name="id_code_qualifier" id="id_code_qualifier">
127      [% FOREACH qualifier IN code_qualifiers %]
128         [% IF qualifier.code == account.id_code_qualifier %]
129            <option value="[% qualifier.code %]" selected="selected">
130                [% qualifier.description %]
131            </option>
132         [% ELSE %]
133            <option value="[% qualifier.code %]">
134               [% qualifier.description %]
135            </option>
136         [% END %]
137      [% END %]
138    </select>
139   </li>
140   <li>
141      <label for="san">SAN: </label>
142      <input type="text" name="san" id="san" size="20" maxlength="90" value="[% account.san %]" />
143   </li>
144   <li>
145      <label for="quotes_enabled">Quotes enabled: </label>
146       [% IF account.quotes_enabled %]
147      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="[% account.quotes_enabled %]" checked />
148       [% ELSE %]
149      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="[% account.quotes_enabled %]" />
150       [% END %]
151   </li>
152   <li>
153      <label for="orders_enabled">Orders enabled: </label>
154 [% IF account.orders_enabled %]
155      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="[% account.orders_enabled %]" checked />
156 [% ELSE %]
157      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="[% account.orders_enabled %]" />
158 [% END %]
159   </li>
160   <li>
161      <label for="invoices_enabled">Invoices enabled: </label>
162 [% IF account.invoices_enabled %]
163      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="[% account.invoices_enabled %]" checked />
164 [% ELSE %]
165      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="[% account.invoices_enabled %]" />
166 [% END %]
167   </li>
168   <li>
169      <label for="responses_enabled">Responses enabled: </label>
170 [% IF account.responses_enabled %]
171      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="[% account.responses_enabled %]" checked />
172 [% ELSE %]
173      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="[% account.responses_enabled %]" />
174 [% END %]
175   </li>
176   <li>
177      <label for="auto_orders">Automatic ordring (Quotes generate orders without staff intervention): </label>
178 [% IF account.auto_orders %]
179      <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" checked />
180 [% ELSE %]
181      <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" />
182 [% END %]
183   </li>
184   </ol>
185   </fieldset>
186
187   <fieldset class="action">
188     <input type="submit" value="Submit" />
189     <a href="/cgi-bin/koha/admin/edi_accounts.pl" class="cancel">Cancel</a>
190   </fieldset>
191 </form>
192
193 [% END %]
194 [% IF delete_confirm %]
195 <div class="dialog alert">
196 <h3>Delete this account?</h3>
197 <table>
198     <tr>
199     <th>Vendor</th>
200     <td>[% account.vendor %]</td>
201     </tr>
202     <tr>
203     <th>Description</th>
204     <td>[% account.description %]</td>
205     </tr>
206     <tr>
207     <th>SAN</th>
208     <td>[% account.san %]</td>
209     </tr>
210 </table>
211 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="post">
212     <table>
213     </table>
214     <input type="hidden" name="op" value="delete_confirmed" />
215     <input type="hidden" name="id" value="[% account.id %]" />
216     <input type="submit" class="approve" value="Yes, Delete" />
217 </form>
218 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="get">
219     <input type="submit" class="deny" value="No, do not Delete" />
220 </form>
221 [% END %]
222 [% IF display %]
223 <h2>Vendor EDI accounts</h2>
224
225     <table>
226     <tr>
227        <th>ID</th>
228        <th>Vendor</th>
229        <th>Description</th>
230        <th>Transport</th>
231        <th>Remote host</th>
232        <th>Username</th>
233        <th>Password</th>
234        <th>Download Directory</th>
235        <th>Upload Directory</th>
236        <th>id_code_type</th>
237        <th>id_code</th>
238        <th>Quotes</th>
239        <th>Orders</th>
240        <th>Invoices</th>
241        <th>Responses</th>
242        <th>Auto ordering</th>
243        <th>Actions</th>
244     </tr>
245     [% FOREACH account IN ediaccounts %]
246     [% IF loop.even %]<tr>
247     [% ELSE %]<tr class="highlight">
248     [% END %]
249       <td>[% account.id %]</td>
250       <td><a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% account.vendor_id %]">[% account.vendor.name %]</a></td>
251       <td>[% account.description %]</td>
252       <td>[% account.transport %]</td>
253       <td>[% account.host %]</td>
254       <td>[% account.username %]</td>
255       <td>[% IF account.password %]xxxxx[% END %]</td>
256       <td>[% account.download_directory %]</td>
257       <td>[% account.upload_directory %]</td>
258       <td>[% account.id_code_qualifier %]</td>
259       <td>[% account.san %]</td>
260       [% IF account.quotes_enabled %]
261          <td>Y</td>
262       [% ELSE %]
263          <td>N</td>
264       [% END %]
265       [% IF account.orders_enabled %]
266          <td>Y</td>
267       [% ELSE %]
268          <td>N</td>
269       [% END %]
270       [% IF account.invoices_enabled %]
271          <td>Y</td>
272       [% ELSE %]
273          <td>N</td>
274       [% END %]
275       [% IF account.responses_enabled %]
276          <td>Y</td>
277       [% ELSE %]
278          <td>N</td>
279       [% END %]
280       [% IF account.auto_orders %]
281          <td>Y</td>
282       [% ELSE %]
283          <td>N</td>
284       [% END %]
285       <td align="center">
286           <a href="/cgi-bin/koha/admin/edi_accounts.pl?op=acct_form&id=[% account.id %]">Edit</a> | <a href="/cgi-bin/koha/admin/edi_accounts.pl?op=delete_confirm&id=[% account.id %]">Delete</a>
287       </td>
288     </tr>
289     [% END %]
290     </table>
291 [% END %]
292
293 </div>
294 </div>
295 <div class="yui-b">
296     [% INCLUDE 'admin-menu.inc' %]
297 </div>
298 </div>
299 [% INCLUDE 'intranet-bottom.inc' %]