Bug 8942: Translation process breaks javascript
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / basketheader.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &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 <style type="text/css">
32
33 div.workarea { padding:10px; float:left }
34
35 ul.draglist { 
36     position: relative;
37     width: 200px; 
38     height:240px;
39     background: #f7f7f7;
40     border: 1px solid gray;
41     list-style: none;
42     margin:0;
43     padding:0;
44 }
45
46 ul.draglist li {
47     margin: 1px;
48     cursor: move;
49     zoom: 1;
50 }
51
52 ul.draglist_alt { 
53     position: relative;
54     width: 200px; 
55     list-style: none;
56     margin:0;
57     padding:0;
58     /*
59        The bottom padding provides the cushion that makes the empty 
60        list targetable.  Alternatively, we could leave the padding 
61        off by default, adding it when we detect that the list is empty.
62     */
63     padding-bottom:20px;
64 }
65
66 ul.draglist_alt li {
67     margin: 1px;
68     cursor: move; 
69 }
70
71
72 li.list1 {
73     background-color: #D1E6EC;
74     border:1px solid #7EA6B2;
75 }
76
77 li.list2 {
78     background-color: #D8D4E2;
79     border:1px solid #6B4C86;
80 }
81
82 #user_actions { float: right; }
83
84 </style>
85
86 </head>
87 <body id="acq_basketheader" class="acq">
88 [% INCLUDE 'header.inc' %]
89 [% INCLUDE 'acquisitions-search.inc' %]
90
91 <div id="breadcrumbs">
92     <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
93     <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
94     <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo;
95     [% IF ( add_form ) %]
96         [% IF ( basketno ) %]Edit basket '[% basketname %]'
97         [% ELSE %]add a basket to [% booksellername %]
98         [% END %]
99     [% END %]
100 </div>
101
102 <div id="doc3" class="yui-t2">
103     <div id="bd">
104     
105     <div id="yui-main">
106     
107     <div class="yui-b">
108     
109     [% IF ( add_form ) %]
110         [% IF ( basketno ) %]
111             <h1>Edit basket [% basketname %]</h1>
112         [% ELSE %]<h1>Add a basket to [% booksellername %]</h1>
113         [% END %]
114     <form name="Aform" action="[% script_name %]" method="post">
115         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
116         <fieldset class="rows">
117             <ol>
118                 [% IF ( basketno ) %]
119                     <li>
120                         <input type="hidden" name="basketno" value="[% basketno %]" />
121                         <input type="hidden" name="is_an_edit" value="1" />
122                     </li>
123                 [% END %]
124                 <li>
125                     <label for="basketname" class="required">Basket name</label> &nbsp;
126                         <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname %]" />
127                 </li>
128                  <li>
129                     <label for="billingplace">Billing Place:</label>
130                     <select name="billingplace" id="billingplace">
131                         <option value="">--</option>
132                         [% FOREACH billingplace IN billingplaceloop %]
133                             [% IF ( billingplace.selected ) %]
134                                 <option value="[% billingplace.value %]" selected="selected">
135                             [% ELSE %]
136                                 <option value="[% billingplace.value %]">
137                             [% END %]
138                                 [% billingplace.branchname %]
139                             </option>
140                         [% END %]
141                     </select>
142                 </li>
143                 <li>
144                     <label for="deliveryplace">Delivery  Place:</label>
145                     <select name="deliveryplace" id="deliveryplace">
146                         <option value="">--</option>
147                         [% FOREACH deliveryplace IN deliveryplaceloop %]
148                             [% IF ( deliveryplace.selected ) %]
149                                 <option value="[% deliveryplace.value %]" selected="selected">
150                             [% ELSE %]
151                                 <option value="[% deliveryplace.value %]">
152                             [% END %]
153                                 [% deliveryplace.branchname %]
154                             </option>
155                         [% END %]
156                     </select>
157                 </li>
158                 <li>
159                     <label for="basketbooksellerid">Vendor</label> &nbsp;
160                     <select name="basketbooksellerid" id="basketbooksellerid">
161                     [% FOREACH b IN booksellers %]
162                         [% IF booksellerid == b.id %]
163                            <option value="[% b.id %]" selected="selected">[% b.name %]</option>
164                         [% ELSE %]
165                            <option value="[% b.id %]">[% b.name %]</option>
166                         [% END %]
167                     [% END %]
168             </select>
169                 </li>
170                 <li>
171                     <label for="basketnote">Internal note</label> &nbsp;
172                     <textarea name="basketnote" id="basketnote" rows="5" cols="40">[% basketnote %]</textarea>
173                 </li>
174                 <li>
175                     <label for="basketbooksellernote">Vendor note</label> &nbsp;
176                     <textarea name="basketbooksellernote" id="basketbooksellernote" rows="5" cols="40">[% basketbooksellernote %]</textarea>
177                 </li>
178                 [% IF ( contractloop ) %]
179                     <li><label for="basketcontractnumber">Contract</label>
180                         <select id="basketcontractnumber" name="basketcontractnumber">
181                             <option value=""></option>
182                             [% FOREACH contractloo IN contractloop %]
183                                 [% IF ( contractloo.selected ) %]
184                                     <option value="[% contractloo.contractnumber %]" selected="selected">[% contractloo.contractname %]</option>
185                                 [% ELSE %]
186                                      <option value="[% contractloo.contractnumber %]">[% contractloo.contractname %]</option>
187                                 [% END %]
188                             [% END %]
189                         </select>
190                     </li>
191                 [% END %]
192             </ol>
193         </fieldset>
194         <fieldset class="action">
195             <input type="hidden" name="op" value="add_validate" />
196             <input type="button" value="Save" onclick="Check(this.form);" />
197         </fieldset>
198     </form>
199     [% END %]
200 </div>
201 </div>
202 <div class="yui-b">
203     [% INCLUDE 'acquisitions-menu.inc' %]
204 </div>
205 </div>
206
207 [% INCLUDE 'intranet-bottom.inc' %]