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 [% WRAPPER 'header.inc' %]
22 [% INCLUDE 'contracts-admin-search.inc' %]
25 [% WRAPPER 'sub-header.inc' %]
26 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
29 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
32 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
35 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
40 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
42 [% IF ( contractnumber ) %]
44 <a href="#" aria-current="page">
45 Modify contract '[% contractname | html %]'
50 <a href="#" aria-current="page">
57 [% IF ( add_validate ) %]
59 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
62 <a href="#" aria-current="page">
68 [% IF ( delete_confirm ) %]
70 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
73 <a href="#" aria-current="page">
74 Confirm deletion of contract [% contractnumber | html %]
79 [% IF ( delete_confirmed ) %]
81 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | uri %]">Contracts</a>
84 <a href="#" aria-current="page">
92 <a href="#" aria-current="page">
101 <div class="main container-fluid">
103 <div class="col-sm-10 col-sm-push-2">
106 [% INCLUDE 'acquisitions-toolbar.inc' %]
108 [% IF error == 'not_deleted' %]
109 <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
112 [% IF ( add_form ) %]
113 <form name="Aform" action="/cgi-bin/koha/admin/aqcontract.pl" id="add_modify_contract" method="post">
114 <input type="hidden" name="op" value="add_validate" />
115 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
116 <input type="hidden" name="checked" value="0" />
117 [% IF ( contractnumber ) %]
118 <h1>Modify contract [% contractname | html %] for [% booksellername | html %]</h1>
120 <h1>New contract for [% booksellername | html %]</h1>
122 <fieldset class="rows">
124 [% IF ( contractnumber ) %]
125 <li><span class="label">Contract id </span>[% contractnumber | html %]
126 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
127 <input type="hidden" name="is_a_modif" value="1" />
130 <li><label for="contractname" class="required">Name:</label>
131 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="[% contractname | html %]" />
132 <span class="required">Required</span>
134 <li><label for="contractdescription">Description: </label>
135 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="[% contractdescription | html %]" />
137 <li><label for="from" class="required">Start date:</label>
138 <input type="text" name="contractstartdate" id="from" value="[% contractstartdate | html %]" maxlength="10" size="10" class="flatpickr" data-date_to="to" />
139 <span class="required">Required</span>
140 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
142 <li><label for="to" class="required">End date:</label>
143 <input type="text" name="contractenddate" id="to" value="[% contractenddate | html %]" maxlength="10" size="10" class="flatpickr" />
144 <span class="required">Required</span>
145 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
149 <fieldset class="action">
150 <input type="submit" class="btn btn-primary" value="Save" /> <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% booksellerid | html %]&contractnumber=[% contractnumber | html %]">Cancel</a>
154 [% IF ( add_validate ) %]
155 <h1>Data recorded</h1>
156 <form action="[% script_name | html %]" method="post">
157 <input type="submit" class="btn btn-primary" value="OK" />
160 [% IF ( delete_confirm ) %]
161 <div class="dialog alert">
162 <h1>Confirm deletion of contract <em>[% contractname | html %]</em></h1>
164 <tr><th scope="row">Contract number:</th><td>[% contractnumber | html %]</td></tr>
165 <tr><th scope="row">Contract name:</th><td>[% contractname | html %]</td></tr>
166 <tr><th scope="row">Contract description:</th><td>[% contractdescription | html %]</td></tr>
167 <tr><th scope="row">Contract start date:</th><td>[% contractstartdate | $KohaDates %]</td></tr>
168 <tr><th scope="row">Contract end date:</th><td>[% contractenddate | $KohaDates %]</td></tr>
169 <tr><th scope="row">Vendor:</th><td>[% booksellername | html %]</td></tr>
171 <form action="[% script_name | html %]" method="post">
172 <input type="hidden" name="op" value="delete_confirmed" />
173 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
174 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
175 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete contract</button>
177 <form action="/cgi-bin/koha/admin/aqcontract.pl" method="get">
178 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
179 <input type="hidden" name="contractnumber" value="[% contractnumber | html %]" />
180 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
184 [% IF ( delete_confirmed ) %]
185 <h1>Contract deleted</h1>
186 <form action="[% script_name | html %]" method="post">
187 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
188 <input type="submit" class="btn btn-primary" value="OK" />
192 <h1>Contract(s) of [% booksellername | html %]</h1>
196 <th scope="col">Name</th>
197 <th scope="col">Description</th>
198 <th scope="col">Start date</th>
199 <th scope="col">End date</th>
200 <th scope="col">Actions</th>
202 [% FOREACH loo IN loop %]
205 <a href="[% loo.script_name | url %]?op=add_form&booksellerid=[% loo.booksellerid | uri %]&contractnumber=[% loo.contractnumber | uri %]">[% loo.contractname | html %]</a>
207 <td>[% loo.contractdescription | html %]</td>
208 <td>[% loo.contractstartdate | html %]</td>
209 <td>[% loo.contractenddate | html %]</td>
211 <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>
212 <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>
218 <div class="dialog message">
219 There are no contracts with this vendor.
221 <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% booksellerid | uri %]">Add a contract</a>.
228 </div> <!-- /.col-sm-10.col-sm-push-2 -->
230 <div class="col-sm-2 col-sm-pull-10">
232 [% INCLUDE 'acquisitions-menu.inc' %]
234 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
235 </div> <!-- /.row -->
237 [% MACRO jsinclude BLOCK %]
238 [% INCLUDE 'calendar.inc' %]
239 [% Asset.js("js/acq.js") | $raw %]
241 $(document).ready(function(){
242 $("#add_modify_contract").validate({
244 contractstartdate: "required",
245 contractname: "required",
248 date_on_or_after: "#from"
253 date_on_or_after: _("Contract end date must be on or after contract start date")
260 [% INCLUDE 'intranet-bottom.inc' %]