5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Acquisitions › Contracts ›
8 [% IF ( contractnumber ) %]Modify contract '[% contractname | html %]'
9 [% ELSE %]New contract[% END %]
11 [% IF ( else ) %]Contracts of [% booksellername | html %][% END %]
12 [% IF ( add_validate ) %]Data recorded[% END %]
13 [% IF ( delete_confirm ) %]Confirm deletion of contract '[% contractnumber | html %]'[% END %]
14 [% IF ( delete_confirmed ) %]Contract deleted[% END %]</title>
15 [% INCLUDE 'doc-head-close.inc' %]
18 <body id="acq_aqcontract" class="acq">
19 [% INCLUDE 'header.inc' %]
20 [% INCLUDE 'contracts-admin-search.inc' %]
22 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
25 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
28 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
31 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
36 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
38 [% IF ( contractnumber ) %]
40 <a href="#" aria-current="page">
41 Modify contract '[% contractname | html %]'
46 <a href="#" aria-current="page">
53 [% IF ( add_validate ) %]
55 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
58 <a href="#" aria-current="page">
64 [% IF ( delete_confirm ) %]
66 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
69 <a href="#" aria-current="page">
70 Confirm deletion of contract [% contractnumber | html %]
75 [% IF ( delete_confirmed ) %]
77 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
80 <a href="#" aria-current="page">
88 <a href="#" aria-current="page">
96 <div class="main container-fluid">
98 <div class="col-sm-10 col-sm-push-2">
101 [% INCLUDE 'acquisitions-toolbar.inc' %]
103 [% IF error == 'not_deleted' %]
104 <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
107 [% IF ( add_form ) %]
108 <form name="Aform" action="/cgi-bin/koha/admin/aqcontract.pl" id="add_modify_contract" method="post">
109 <input type="hidden" name="op" value="add_validate" />
110 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
111 <input type="hidden" name="checked" value="0" />
112 [% IF ( contractnumber ) %]
113 <h1>Modify contract [% contractname | html %] for [% booksellername | html %]</h1>
115 <h1>New contract for [% booksellername | html %]</h1>
117 <fieldset class="rows">
119 [% IF ( contractnumber ) %]
120 <li><span class="label">Contract id </span>[% contractnumber | html %]
121 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
122 <input type="hidden" name="is_a_modif" value="1" />
125 <li><label for="contractname" class="required">Name:</label>
126 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname | html %]" />
127 <span class="required">Required</span>
129 <li><label for="contractdescription">Description: </label>
130 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription | html %]" />
132 <li><label for="from" class="required">Start date:</label>
133 <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | $KohaDates %]" maxlength="10" size="10" class="datepickerfrom" />
134 <span class="required">Required</span>
135 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
137 <li><label for="to" class="required">End date:</label>
138 <input type="text" name="contractenddate" id="to" value="[% contractenddate | $KohaDates %]" maxlength="10" size="10" class="datepickerto" />
139 <span class="required">Required</span>
140 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
144 <fieldset class="action">
145 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | html %]&contractnumber=[% contractnumber | html %]">Cancel</a>
149 [% IF ( add_validate ) %]
150 <h3>Data recorded</h3>
151 <form action="[% script_name | html %]" method="post">
152 <input type="submit" value="OK" />
155 [% IF ( delete_confirm ) %]
156 <div class="dialog alert">
157 <h3>Confirm deletion of contract <em>[% contractname | html %]</em></h3>
159 <tr><th scope="row">Contract number:</th><td>[% contractnumber | html %]</td></tr>
160 <tr><th scope="row">Contract name:</th><td>[% contractname | html %]</td></tr>
161 <tr><th scope="row">Contract description:</th><td>[% contractdescription | html %]</td></tr>
162 <tr><th scope="row">Contract start date:</th><td>[% contractstartdate | $KohaDates %]</td></tr>
163 <tr><th scope="row">Contract end date:</th><td>[% contractenddate | $KohaDates %]</td></tr>
164 <tr><th scope="row">Vendor:</th><td>[% booksellername | html %]</td></tr>
166 <form action="[% script_name | html %]" method="post">
167 <input type="hidden" name="op" value="delete_confirmed" />
168 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
169 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
170 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete contract</button>
172 <form action="/cgi-bin/koha/admin/aqcontract.pl" method="get">
173 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
174 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
175 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
179 [% IF ( delete_confirmed ) %]
180 <h3>Contract deleted</h3>
181 <form action="[% script_name | html %]" method="post">
182 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
183 <input type="submit" value="OK" />
187 <h2>Contract(s) of [% booksellername | html %]</h2>
191 <th scope="col">Name</th>
192 <th scope="col">Description</th>
193 <th scope="col">Start date</th>
194 <th scope="col">End date</th>
195 <th scope="col">Actions</th>
197 [% FOREACH loo IN loop %]
200 <a href="[% loo.script_name | url %]?op=add_form&booksellerid=[% loo.booksellerid | uri %]&contractnumber=[% loo.contractnumber | uri %]">[% loo.contractname | html %]</a>
202 <td>[% loo.contractdescription | html %]</td>
203 <td>[% loo.contractstartdate | html %]</td>
204 <td>[% loo.contractenddate | html %]</td>
206 <a href="[% loo.script_name | url %]?op=add_form&contractnumber=[% loo.contractnumber | uri %]&booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
207 <a href="[% loo.script_name | url %]?op=delete_confirm&contractnumber=[% loo.contractnumber | uri %]&booksellerid=[% loo.booksellerid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-trash"></i> Delete</a>
213 <div class="dialog message">
214 There are no contracts with this vendor.
216 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid | uri %]">Add a contract</a>.
223 </div> <!-- /.col-sm-10.col-sm-push-2 -->
225 <div class="col-sm-2 col-sm-pull-10">
227 [% INCLUDE 'acquisitions-menu.inc' %]
229 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
230 </div> <!-- /.row -->
232 [% MACRO jsinclude BLOCK %]
233 [% INCLUDE 'calendar.inc' %]
234 [% Asset.js("js/acq.js") | $raw %]
236 $(document).ready(function(){
237 $("#add_modify_contract").validate({
239 contractstartdate: "required",
240 contractname: "required",
243 date_on_or_after: "#from"
248 date_on_or_after: _("Contract end date must be on or after contract start date")
255 [% INCLUDE 'intranet-bottom.inc' %]