5 [% INCLUDE 'doc-head-open.inc' %]
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 %]
15 › Contracts › Acquisitions › Koha
17 [% INCLUDE 'doc-head-close.inc' %]
20 <body id="acq_aqcontract" class="acq">
21 [% INCLUDE 'header.inc' %]
22 [% INCLUDE 'contracts-admin-search.inc' %]
24 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
27 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
30 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
33 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
38 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
40 [% IF ( contractnumber ) %]
42 <a href="#" aria-current="page">
43 Modify contract '[% contractname | html %]'
48 <a href="#" aria-current="page">
55 [% IF ( add_validate ) %]
57 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
60 <a href="#" aria-current="page">
66 [% IF ( delete_confirm ) %]
68 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
71 <a href="#" aria-current="page">
72 Confirm deletion of contract [% contractnumber | html %]
77 [% IF ( delete_confirmed ) %]
79 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
82 <a href="#" aria-current="page">
90 <a href="#" aria-current="page">
98 <div class="main container-fluid">
100 <div class="col-sm-10 col-sm-push-2">
103 [% INCLUDE 'acquisitions-toolbar.inc' %]
105 [% IF error == 'not_deleted' %]
106 <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
109 [% IF ( add_form ) %]
110 <form name="Aform" action="/cgi-bin/koha/admin/aqcontract.pl" id="add_modify_contract" method="post">
111 <input type="hidden" name="op" value="add_validate" />
112 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
113 <input type="hidden" name="checked" value="0" />
114 [% IF ( contractnumber ) %]
115 <h1>Modify contract [% contractname | html %] for [% booksellername | html %]</h1>
117 <h1>New contract for [% booksellername | html %]</h1>
119 <fieldset class="rows">
121 [% IF ( contractnumber ) %]
122 <li><span class="label">Contract id </span>[% contractnumber | html %]
123 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
124 <input type="hidden" name="is_a_modif" value="1" />
127 <li><label for="contractname" class="required">Name:</label>
128 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname | html %]" />
129 <span class="required">Required</span>
131 <li><label for="contractdescription">Description: </label>
132 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription | html %]" />
134 <li><label for="from" class="required">Start date:</label>
135 <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | $KohaDates %]" maxlength="10" size="10" class="datepickerfrom" />
136 <span class="required">Required</span>
137 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
139 <li><label for="to" class="required">End date:</label>
140 <input type="text" name="contractenddate" id="to" value="[% contractenddate | $KohaDates %]" maxlength="10" size="10" class="datepickerto" />
141 <span class="required">Required</span>
142 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
146 <fieldset class="action">
147 <input type="submit" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | html %]&contractnumber=[% contractnumber | html %]">Cancel</a>
151 [% IF ( add_validate ) %]
152 <h3>Data recorded</h3>
153 <form action="[% script_name | html %]" method="post">
154 <input type="submit" value="OK" />
157 [% IF ( delete_confirm ) %]
158 <div class="dialog alert">
159 <h3>Confirm deletion of contract <em>[% contractname | html %]</em></h3>
161 <tr><th scope="row">Contract number:</th><td>[% contractnumber | html %]</td></tr>
162 <tr><th scope="row">Contract name:</th><td>[% contractname | html %]</td></tr>
163 <tr><th scope="row">Contract description:</th><td>[% contractdescription | html %]</td></tr>
164 <tr><th scope="row">Contract start date:</th><td>[% contractstartdate | $KohaDates %]</td></tr>
165 <tr><th scope="row">Contract end date:</th><td>[% contractenddate | $KohaDates %]</td></tr>
166 <tr><th scope="row">Vendor:</th><td>[% booksellername | html %]</td></tr>
168 <form action="[% script_name | html %]" method="post">
169 <input type="hidden" name="op" value="delete_confirmed" />
170 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
171 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
172 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete contract</button>
174 <form action="/cgi-bin/koha/admin/aqcontract.pl" method="get">
175 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
176 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
177 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
181 [% IF ( delete_confirmed ) %]
182 <h3>Contract deleted</h3>
183 <form action="[% script_name | html %]" method="post">
184 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
185 <input type="submit" value="OK" />
189 <h2>Contract(s) of [% booksellername | html %]</h2>
193 <th scope="col">Name</th>
194 <th scope="col">Description</th>
195 <th scope="col">Start date</th>
196 <th scope="col">End date</th>
197 <th scope="col">Actions</th>
199 [% FOREACH loo IN loop %]
202 <a href="[% loo.script_name | url %]?op=add_form&booksellerid=[% loo.booksellerid | uri %]&contractnumber=[% loo.contractnumber | uri %]">[% loo.contractname | html %]</a>
204 <td>[% loo.contractdescription | html %]</td>
205 <td>[% loo.contractstartdate | html %]</td>
206 <td>[% loo.contractenddate | html %]</td>
208 <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>
209 <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>
215 <div class="dialog message">
216 There are no contracts with this vendor.
218 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid | uri %]">Add a contract</a>.
225 </div> <!-- /.col-sm-10.col-sm-push-2 -->
227 <div class="col-sm-2 col-sm-pull-10">
229 [% INCLUDE 'acquisitions-menu.inc' %]
231 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
232 </div> <!-- /.row -->
234 [% MACRO jsinclude BLOCK %]
235 [% INCLUDE 'calendar.inc' %]
236 [% Asset.js("js/acq.js") | $raw %]
238 $(document).ready(function(){
239 $("#add_modify_contract").validate({
241 contractstartdate: "required",
242 contractname: "required",
245 date_on_or_after: "#from"
250 date_on_or_after: _("Contract end date must be on or after contract start date")
257 [% INCLUDE 'intranet-bottom.inc' %]