Lines 189-227
Link Here
|
189 |
<td>[% cash_register.library.branchname | html %]</td> |
189 |
<td>[% cash_register.library.branchname | html %]</td> |
190 |
<td>[% IF cash_register.branch_default %]Yes[% ELSE %]No[% END %]</td> |
190 |
<td>[% IF cash_register.branch_default %]Yes[% ELSE %]No[% END %]</td> |
191 |
<td>[% cash_register.starting_float | $Price %]</td> |
191 |
<td>[% cash_register.starting_float | $Price %]</td> |
192 |
[% IF cash_register.archived == '0' %] |
|
|
193 |
<td class="actions"> |
192 |
<td class="actions"> |
|
|
193 |
[% IF cash_register.archived == '0' %] |
194 |
<a class="btn btn-default btn-xs" href="cash_registers.pl?op=add_form&id=[% cash_register.id | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
194 |
<a class="btn btn-default btn-xs" href="cash_registers.pl?op=add_form&id=[% cash_register.id | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
195 |
[% IF cash_register.branch_default %] |
195 |
[% IF cash_register.branch_default %] |
196 |
<form id="drop_default_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
196 |
<form id="drop_default_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
197 |
[% INCLUDE 'csrf-token.inc' %] |
197 |
[% INCLUDE 'csrf-token.inc' %] |
198 |
<input type="hidden" name="op" value="cud-drop_default" /> |
198 |
<input type="hidden" name="op" value="cud-drop_default" /> |
199 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
199 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
|
|
200 |
<button type="submit" id="drop_default_button" class="btn btn-default btn-xs" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-archive"></i> Drop default</button> |
200 |
</form> |
201 |
</form> |
201 |
<a id="drop_default_button" class="btn btn-default btn-xs" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-archive"></i> Drop default</a> |
|
|
202 |
[% ELSE %] |
202 |
[% ELSE %] |
203 |
<form id="make_default_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
203 |
<form id="make_default_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
204 |
[% INCLUDE 'csrf-token.inc' %] |
204 |
[% INCLUDE 'csrf-token.inc' %] |
205 |
<input type="hidden" name="op" value="cud-make_default" /> |
205 |
<input type="hidden" name="op" value="cud-make_default" /> |
206 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
206 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
|
|
207 |
<button type="submit" class="btn btn-default btn-xs make_default_button" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-archive"></i> Make default</button> |
207 |
</form> |
208 |
</form> |
208 |
<a class="btn btn-default btn-xs make_default_button" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-archive"></i> Make default</a> |
|
|
209 |
[% END %] |
209 |
[% END %] |
210 |
<form id="archive_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
210 |
<form id="archive_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
211 |
[% INCLUDE 'csrf-token.inc' %] |
211 |
[% INCLUDE 'csrf-token.inc' %] |
212 |
<input type="hidden" name="op" value="cud-archive" /> |
212 |
<input type="hidden" name="op" value="cud-archive" /> |
213 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
213 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
|
|
214 |
<button type="submit" class="btn btn-default btn-xs archive_button" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-archive"></i> Archive</button> |
214 |
</form> |
215 |
</form> |
215 |
<a class="btn btn-default btn-xs archive_button" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-archive"></i> Archive</a> |
|
|
216 |
</td> |
217 |
[% ELSE %] |
216 |
[% ELSE %] |
218 |
<form id="unarchive_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
217 |
<form id="unarchive_[% cash_register.id | html %]" method="post" action="/cgi-bin/koha/admin/cash_registers.pl"> |
219 |
[% INCLUDE 'csrf-token.inc' %] |
218 |
[% INCLUDE 'csrf-token.inc' %] |
220 |
<input type="hidden" name="op" value="cud-unarchive" /> |
219 |
<input type="hidden" name="op" value="cud-unarchive" /> |
221 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
220 |
<input type="hidden" name="id" value="[% cash_register.id | html %]" /> |
|
|
221 |
<button type="submit" class="btn btn-default btn-xs unarchive_button" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-trash-can-restore"></i> Restore</button> |
222 |
</form> |
222 |
</form> |
223 |
<td class="actions"><a class="btn btn-default btn-xs unarchive_button" href="#" data-id="[% cash_register.id | html %]"><i class="fa fa-trash-can-restore"></i> Restore</a></td> |
|
|
224 |
[% END %] |
223 |
[% END %] |
|
|
224 |
</td> |
225 |
</tr> |
225 |
</tr> |
226 |
[% END %] |
226 |
[% END %] |
227 |
</tbody> |
227 |
</tbody> |
Lines 277-305
Link Here
|
277 |
filterDataTable( crtable, 2, opt ); |
277 |
filterDataTable( crtable, 2, opt ); |
278 |
}); |
278 |
}); |
279 |
|
279 |
|
280 |
$("#drop_default_button").on("click", function(e){ |
|
|
281 |
e.preventDefault(); |
282 |
var id = $(this).data('id'); |
283 |
$('#drop_default_'+id).submit(); |
284 |
}); |
285 |
|
286 |
$(".make_default_button").on("click", function(e){ |
287 |
e.preventDefault(); |
288 |
var id = $(this).data('id'); |
289 |
$('#make_default_'+id).submit(); |
290 |
}); |
291 |
|
292 |
$(".archive_button").on("click", function(e){ |
293 |
e.preventDefault(); |
294 |
var id = $(this).data('id'); |
295 |
$('#archive_'+id).submit(); |
296 |
}); |
297 |
|
298 |
$(".unarchive_button").on("click", function(e){ |
299 |
e.preventDefault(); |
300 |
var id = $(this).data('id'); |
301 |
$('#unarchive_'+id).submit(); |
302 |
}); |
303 |
}); |
280 |
}); |
304 |
</script> |
281 |
</script> |
305 |
[% END %] |
282 |
[% END %] |