Bug 15758: Koha::Libraries - Remove GetBranchesLoop
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketheader.tt
1 [% USE Branches %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo;
4 [% IF ( add_form ) %]
5     [% IF ( basketno ) %]Edit basket '[% basketname %]'
6         [% ELSE %]Add a basket to [% booksellername %]
7     [% END %]
8 [% END %]
9 </title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 <script type="text/javascript" src="[% interface %]/[% theme %]/js/acq.js"></script>
12 </head>
13 <body id="acq_basketheader" class="acq">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'acquisitions-search.inc' %]
16
17 <div id="breadcrumbs">
18     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
19     <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
20     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo;
21     [% IF ( add_form ) %]
22         [% IF ( basketno ) %]Edit basket '[% basketname %]'
23         [% ELSE %]Add a basket to [% booksellername %]
24         [% END %]
25     [% END %]
26 </div>
27
28 <div id="doc" class="yui-t7">
29     <div id="bd">
30
31     <div id="yui-main">
32
33     [% IF ( add_form ) %]
34         [% IF ( basketno ) %]
35             <h1>Edit basket [% basketname %]</h1>
36         [% ELSE %]<h1>Add a basket to [% booksellername %]</h1>
37         [% END %]
38     <form name="Aform" action="[% script_name %]" method="post" class="validated">
39         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
40         <fieldset class="rows">
41             <ol>
42                 [% IF ( basketno ) %]
43                     <li>
44                         <input type="hidden" name="basketno" value="[% basketno %]" />
45                         <input type="hidden" name="is_an_edit" value="1" />
46                     </li>
47                 [% END %]
48                 <li>
49                     <label for="basketname" class="required">Basket name: </label> &nbsp;
50                         <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname %]" required="required" class="required" />
51                         <span class="required">Required</span>
52                 </li>
53                  <li>
54                     <label for="billingplace">Billing place:</label>
55                     <select name="billingplace" id="billingplace">
56                         <option value="">--</option>
57                         [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
58                     </select>
59                 </li>
60                 <li>
61                     <label for="deliveryplace">Delivery place:</label>
62                     <select name="deliveryplace" id="deliveryplace">
63                         <option value="">--</option>
64                         [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
65                     </select>
66                 </li>
67                 <li>
68                     <label for="basketbooksellerid">Vendor: </label> &nbsp;
69                     <select name="basketbooksellerid" id="basketbooksellerid">
70                     [% FOREACH b IN booksellers %]
71                         [% IF booksellerid == b.id %]
72                            <option value="[% b.id %]" selected="selected">[% b.name %]</option>
73                         [% ELSE %]
74                            <option value="[% b.id %]">[% b.name %]</option>
75                         [% END %]
76                     [% END %]
77             </select>
78                 </li>
79                 <li>
80                     <label for="basketnote">Internal note: </label> &nbsp;
81                     <textarea name="basketnote" id="basketnote" rows="5" cols="40">[% basketnote %]</textarea>
82                 </li>
83                 <li>
84                     <label for="basketbooksellernote">Vendor note: </label> &nbsp;
85                     <textarea name="basketbooksellernote" id="basketbooksellernote" rows="5" cols="40">[% basketbooksellernote %]</textarea>
86                 </li>
87                 [% IF ( contractloop ) %]
88                     <li><label for="basketcontractnumber">Contract: </label>
89                         <select id="basketcontractnumber" name="basketcontractnumber">
90                             <option value=""></option>
91                             [% FOREACH contractloo IN contractloop %]
92                                 [% IF ( contractloo.selected ) %]
93                                     <option value="[% contractloo.contractnumber %]" selected="selected">[% contractloo.contractname %]</option>
94                                 [% ELSE %]
95                                      <option value="[% contractloo.contractnumber %]">[% contractloo.contractname %]</option>
96                                 [% END %]
97                             [% END %]
98                         </select>
99                     </li>
100                 [% END %]
101                 <li>
102                     <label for="is_standing">Orders are standing:</label>
103                     [% IF is_standing %]
104                         <input type="checkbox" id="is_standing" name="is_standing" checked="checked" />
105                     [% ELSE %]
106                         <input type="checkbox" id="is_standing" name="is_standing"/>
107                     [% END %]
108                     <div class="hint">Standing orders do not close when received.</div>
109                 </li>
110             </ol>
111         </fieldset>
112         <fieldset class="action">
113             <input type="hidden" name="op" value="add_validate" />
114             <input type="submit" value="Save" />
115             [% IF ( basketno ) %]
116                 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
117             [% ELSE %]
118                 <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a>
119             [% END %]
120         </fieldset>
121     </form>
122     [% END %]
123 </div>
124 </div>
125
126 [% INCLUDE 'intranet-bottom.inc' %]