Merge branch 'bug_9850' into 3.14-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketheader.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Acquisitions &rsaquo;
3 [% IF ( add_form ) %]
4     [% IF ( basketno ) %]Edit basket '[% basketname %]'
5         [% ELSE %]Add a basket to [% booksellername %]
6     [% END %]
7 [% END %]
8 </title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
11 <script type="text/javascript">
12 //<![CDATA[
13 // to check if the data are correctly entered.
14 function Check(ff) {
15     var ok=0;
16     var _alertString="Form not submitted because of the following problem(s)";
17     _alertString +="\n-------------------------------------------------------------------\n\n";
18     if (!(isNotNull(ff.basketname,0))){
19         ok=1;
20         _alertString += "- name missing\n";
21     }
22     if (ok) { // if there is a problem
23         alert(_alertString);
24     return false;
25 }
26 // if all is good
27     ff.submit();
28 }
29 //]]>
30 </script>
31 </head>
32 <body id="acq_basketheader" class="acq">
33 [% INCLUDE 'header.inc' %]
34 [% INCLUDE 'acquisitions-search.inc' %]
35
36 <div id="breadcrumbs">
37     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
38     <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
39     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo;
40     [% IF ( add_form ) %]
41         [% IF ( basketno ) %]Edit basket '[% basketname %]'
42         [% ELSE %]Add a basket to [% booksellername %]
43         [% END %]
44     [% END %]
45 </div>
46
47 <div id="doc" class="yui-t7">
48     <div id="bd">
49
50     <div id="yui-main">
51
52     [% IF ( add_form ) %]
53         [% IF ( basketno ) %]
54             <h1>Edit basket [% basketname %]</h1>
55         [% ELSE %]<h1>Add a basket to [% booksellername %]</h1>
56         [% END %]
57     <form name="Aform" action="[% script_name %]" method="post">
58         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
59         <fieldset class="rows">
60             <ol>
61                 [% IF ( basketno ) %]
62                     <li>
63                         <input type="hidden" name="basketno" value="[% basketno %]" />
64                         <input type="hidden" name="is_an_edit" value="1" />
65                     </li>
66                 [% END %]
67                 <li>
68                     <label for="basketname" class="required">Basket name: </label> &nbsp;
69                         <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname %]" />
70                 </li>
71                  <li>
72                     <label for="billingplace">Billing place:</label>
73                     <select name="billingplace" id="billingplace">
74                         <option value="">--</option>
75                         [% FOREACH billingplace IN billingplaceloop %]
76                             [% IF ( billingplace.selected ) %]
77                                 <option value="[% billingplace.value %]" selected="selected">
78                             [% ELSE %]
79                                 <option value="[% billingplace.value %]">
80                             [% END %]
81                                 [% billingplace.branchname %]
82                             </option>
83                         [% END %]
84                     </select>
85                 </li>
86                 <li>
87                     <label for="deliveryplace">Delivery place:</label>
88                     <select name="deliveryplace" id="deliveryplace">
89                         <option value="">--</option>
90                         [% FOREACH deliveryplace IN deliveryplaceloop %]
91                             [% IF ( deliveryplace.selected ) %]
92                                 <option value="[% deliveryplace.value %]" selected="selected">
93                             [% ELSE %]
94                                 <option value="[% deliveryplace.value %]">
95                             [% END %]
96                                 [% deliveryplace.branchname %]
97                             </option>
98                         [% END %]
99                     </select>
100                 </li>
101                 <li>
102                     <label for="basketbooksellerid">Vendor: </label> &nbsp;
103                     <select name="basketbooksellerid" id="basketbooksellerid">
104                     [% FOREACH b IN booksellers %]
105                         [% IF booksellerid == b.id %]
106                            <option value="[% b.id %]" selected="selected">[% b.name %]</option>
107                         [% ELSE %]
108                            <option value="[% b.id %]">[% b.name %]</option>
109                         [% END %]
110                     [% END %]
111             </select>
112                 </li>
113                 <li>
114                     <label for="basketnote">Internal note: </label> &nbsp;
115                     <textarea name="basketnote" id="basketnote" rows="5" cols="40">[% basketnote %]</textarea>
116                 </li>
117                 <li>
118                     <label for="basketbooksellernote">Vendor note: </label> &nbsp;
119                     <textarea name="basketbooksellernote" id="basketbooksellernote" rows="5" cols="40">[% basketbooksellernote %]</textarea>
120                 </li>
121                 [% IF ( contractloop ) %]
122                     <li><label for="basketcontractnumber">Contract: </label>
123                         <select id="basketcontractnumber" name="basketcontractnumber">
124                             <option value=""></option>
125                             [% FOREACH contractloo IN contractloop %]
126                                 [% IF ( contractloo.selected ) %]
127                                     <option value="[% contractloo.contractnumber %]" selected="selected">[% contractloo.contractname %]</option>
128                                 [% ELSE %]
129                                      <option value="[% contractloo.contractnumber %]">[% contractloo.contractname %]</option>
130                                 [% END %]
131                             [% END %]
132                         </select>
133                     </li>
134                 [% END %]
135             </ol>
136         </fieldset>
137         <fieldset class="action">
138             <input type="hidden" name="op" value="add_validate" />
139             <input type="button" value="Save" onclick="Check(this.form);" />
140             <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a>
141         </fieldset>
142     </form>
143     [% END %]
144 </div>
145 </div>
146
147 [% INCLUDE 'intranet-bottom.inc' %]