Bug 19029: (follow-up) Make security question appear on clone operations from one...
[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 'prefs-admin-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 = [ 'FTP', 'SFTP', 'FILE' ] %]
101      <label for="transport">Transport: </label>
102      <select name="transport" title="valid types of transport are FTP and SFTP"
103       id="transport">
104       [% FOREACH transport_type IN transport_types %]
105            [% IF transport_type == account.transport %]
106               <option value="[% transport_type %]" selected="selected">[% transport_type %]</option>
107            [% ELSE %]
108               <option value="[% transport_type %]">[% transport_type %]</option>
109            [% END %]
110        [% END %]
111      </select>
112   </li>
113   <li>
114      <label for="host">Remote host: </label>
115      <input type="text" name="host" id="host" size="20" maxlength="40" value="[% account.host %]" />
116   </li>
117   <li>
118      <label for="username">Username: </label>
119      <input type="text" name="username" id="username" size="20" maxlength="40" value="[% account.username %]" />
120   </li>
121   <li>
122      <label for="password">Password: </label>
123      <input type="text" name="password" id="password" size="20" maxlength="40" value="[% account.password %]" />
124   </li>
125   <li>
126      <label for="download_directory">Download directory: </label>
127      <input type="text" name="download_directory" id="download_directory" size="20" value="[% account.download_directory %]" />
128         <div class="hint">The download directory specifies the directory on the ftp site from which quotes and invoices are downloaded.</div>
129   </li>
130   <li>
131      <label for="upload_directory">Upload directory: </label>
132      <input type="text" name="upload_directory" id="upload_directory" size="20" value="[% account.upload_directory %]" />
133         <div class="hint">The upload directory specifies the directory on the ftp site to which orders are uploaded.</div>
134   </li>
135   <li>
136      <label for="id_code_qualifier">Qualifier:</label>
137      <select name="id_code_qualifier" id="id_code_qualifier">
138      [% FOREACH qualifier IN code_qualifiers %]
139         [% IF qualifier.code == account.id_code_qualifier %]
140            <option value="[% qualifier.code %]" selected="selected">
141                [% qualifier.description %] ([% qualifier.code %])
142            </option>
143         [% ELSE %]
144            <option value="[% qualifier.code %]">
145               [% qualifier.description %] ([% qualifier.code %])
146            </option>
147         [% END %]
148      [% END %]
149    </select>
150   </li>
151   <li>
152      <label for="san">SAN: </label>
153      <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san %]" />
154   </li>
155   <li>
156      <label for="quotes_enabled">Quotes enabled: </label>
157       [% IF account.quotes_enabled %]
158      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="[% account.quotes_enabled %]" checked="checked" />
159       [% ELSE %]
160      <input type="checkbox" name="quotes_enabled" id="quotes_enabled" value="[% account.quotes_enabled %]" />
161       [% END %]
162   </li>
163   <li>
164      <label for="orders_enabled">Orders enabled: </label>
165 [% IF account.orders_enabled %]
166      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="[% account.orders_enabled %]" checked="checked" />
167 [% ELSE %]
168      <input type="checkbox" name="orders_enabled" id="orders_enabled" value="[% account.orders_enabled %]" />
169 [% END %]
170   </li>
171   <li>
172      <label for="invoices_enabled">Invoices enabled: </label>
173 [% IF account.invoices_enabled %]
174      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="[% account.invoices_enabled %]" checked="checked" />
175 [% ELSE %]
176      <input type="checkbox" name="invoices_enabled" id="invoices_enabled" value="[% account.invoices_enabled %]" />
177 [% END %]
178   </li>
179   <li>
180      <label for="responses_enabled">Responses enabled: </label>
181 [% IF account.responses_enabled %]
182      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="[% account.responses_enabled %]" checked="checked" />
183 [% ELSE %]
184      <input type="checkbox" name="responses_enabled" id="responses_enabled" value="[% account.responses_enabled %]" />
185 [% END %]
186   </li>
187   <li>
188      <label for="auto_orders">Automatic ordering: </label>
189 [% IF account.auto_orders %]
190      <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" checked="checked" />
191 [% ELSE %]
192      <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" />
193 [% END %]
194     <div class="hint">
195         With automatic ordering quotes generate orders without staff intervention.
196     </div>
197   </li>
198   </ol>
199   </fieldset>
200
201   <fieldset class="action">
202     <input type="submit" value="Submit" />
203     <a href="/cgi-bin/koha/admin/edi_accounts.pl" class="cancel">Cancel</a>
204   </fieldset>
205 </form>
206
207 [% END %]
208 [% IF delete_confirm %]
209 <div class="dialog alert">
210 <h3>Delete this account?</h3>
211 <table>
212     <tr>
213     <th>Vendor</th>
214     <td>[% account.vendor.name %]</td>
215     </tr>
216     <tr>
217     <th>Description</th>
218     <td>[% account.description %]</td>
219     </tr>
220     <tr>
221     <th>SAN</th>
222     <td>[% account.san %]</td>
223     </tr>
224 </table>
225 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="post">
226     <table>
227     </table>
228     <input type="hidden" name="op" value="delete_confirmed" />
229     <input type="hidden" name="id" value="[% account.id %]" />
230     <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
231 </form>
232 <form action="/cgi-bin/koha/admin/edi_accounts.pl" method="get">
233     <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
234 </form>
235 </div>
236 [% END %]
237 [% IF display %]
238 [% IF ( ediaccounts ) %]
239 <h2>Vendor EDI accounts</h2>
240
241     <table>
242     <tr>
243        <th>ID</th>
244        <th>Vendor</th>
245        <th>Description</th>
246        <th>Transport</th>
247        <th>Remote host</th>
248        <th>Username</th>
249        <th>Password</th>
250        <th>Download directory</th>
251        <th>Upload directory</th>
252        <th>Qualifier</th>
253        <th>SAN</th>
254        <th>Quotes</th>
255        <th>Orders</th>
256        <th>Invoices</th>
257        <th>Responses</th>
258        <th>Auto ordering</th>
259        <th>Actions</th>
260     </tr>
261     [% FOREACH account IN ediaccounts %]
262     <tr>
263       <td>[% account.id %]</td>
264       <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% account.vendor_id %]">[% account.vendor.name %]</a></td>
265       <td>[% account.description %]</td>
266       <td>[% account.transport %]</td>
267       <td>[% account.host %]</td>
268       <td>[% account.username %]</td>
269       <td>[% IF account.password %]*****[% END %]</td>
270       <td>[% account.download_directory %]</td>
271       <td>[% account.upload_directory %]</td>
272       <td>
273          [% FOREACH qualifier IN code_qualifiers %]
274             [% IF qualifier.code == account.id_code_qualifier %]
275                    [% qualifier.description %]
276             [% END %]
277          [% END %]
278          ([% account.id_code_qualifier %])
279      </td>
280       <td>[% account.san %]</td>
281       [% IF account.quotes_enabled %]
282          <td>Y</td>
283       [% ELSE %]
284          <td>N</td>
285       [% END %]
286       [% IF account.orders_enabled %]
287          <td>Y</td>
288       [% ELSE %]
289          <td>N</td>
290       [% END %]
291       [% IF account.invoices_enabled %]
292          <td>Y</td>
293       [% ELSE %]
294          <td>N</td>
295       [% END %]
296       [% IF account.responses_enabled %]
297          <td>Y</td>
298       [% ELSE %]
299          <td>N</td>
300       [% END %]
301       [% IF account.auto_orders %]
302          <td>Y</td>
303       [% ELSE %]
304          <td>N</td>
305       [% END %]
306       <td class="actions">
307           <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>
308       </td>
309     </tr>
310     [% END %]
311     </table>
312     [% ELSE %]
313         <div class="dialog message">
314             There are no EDI accounts.
315         </div>
316     [% END %]
317 [% END %]
318
319 </div>
320 </div>
321 <div class="yui-b">
322     [% INCLUDE 'admin-menu.inc' %]
323 </div>
324 </div>
325 [% INCLUDE 'intranet-bottom.inc' %]