Lines 223-232
Link Here
|
223 |
[% IF !debit_type.archived %] |
223 |
[% IF !debit_type.archived %] |
224 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=[% debit_type.code | uri %]&type=debit"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
224 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/debit_types.pl?op=add_form&code=[% debit_type.code | uri %]&type=debit"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
225 |
[% IF !debit_type.is_system %] |
225 |
[% IF !debit_type.is_system %] |
226 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/debit_types.pl?op=archive&code=[% debit_type.code | uri %]"><i class="fa fa-archive"></i> Archive</a> |
226 |
<form id="archive_[% debit_type.code | html %]" method="post" action="/cgi-bin/koha/admin/debit_types.pl"> |
|
|
227 |
[% INCLUDE 'csrf-token.inc' %] |
228 |
<input type="hidden" name="op" value="cud-archive" /> |
229 |
<input type="hidden" name="code" value="[% debit_type.code | html %]" /> |
230 |
</form> |
231 |
<a class="btn btn-default btn-xs archive_button" href="#" data-code="[% debit_type.code | html %]"><i class="fa fa-archive"></i> Archive</a> |
227 |
[% END %] |
232 |
[% END %] |
228 |
[% ELSIF debit_type.archived %] |
233 |
[% ELSIF debit_type.archived %] |
229 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/debit_types.pl?op=unarchive&code=[% debit_type.code | uri %]"><i class="fa fa-undo"></i> Restore</a> |
234 |
<form id="unarchive_[% debit_type.code | html %]" method="post" action="/cgi-bin/koha/admin/debit_types.pl"> |
|
|
235 |
[% INCLUDE 'csrf-token.inc' %] |
236 |
<input type="hidden" name="op" value="cud-unarchive" /> |
237 |
<input type="hidden" name="code" value="[% debit_type.code | html %]" /> |
238 |
</form> |
239 |
<a class="btn btn-default btn-xs unarchive_button" href="#" data-code="[% debit_type.code | html %]"><i class="fa fa-undo"></i> Restore</a> |
230 |
[% END %] |
240 |
[% END %] |
231 |
</td> |
241 |
</td> |
232 |
</tr> |
242 |
</tr> |
Lines 284-289
Link Here
|
284 |
|
294 |
|
285 |
//Start filtered |
295 |
//Start filtered |
286 |
$('#filter_system').click(); |
296 |
$('#filter_system').click(); |
|
|
297 |
|
298 |
$(".archive_button").on("click", function(e){ |
299 |
e.preventDefault(); |
300 |
var code = $(this).data('code'); |
301 |
$('#archive_'+code).submit(); |
302 |
}); |
303 |
|
304 |
$(".unarchive_button").on("click", function(e){ |
305 |
e.preventDefault(); |
306 |
var code = $(this).data('code'); |
307 |
$('#unarchive_'+code).submit(); |
308 |
}); |
287 |
}); |
309 |
}); |
288 |
</script> |
310 |
</script> |
289 |
[% END %] |
311 |
[% END %] |
290 |
- |
|
|