Lines 202-212
Link Here
|
202 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=[% credit_type.code | uri %]&type=credit"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
202 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=add_form&code=[% credit_type.code | uri %]&type=credit"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
203 |
[% END %] |
203 |
[% END %] |
204 |
[% IF !credit_type.is_system && !credit_type.archived %] |
204 |
[% IF !credit_type.is_system && !credit_type.archived %] |
205 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=archive&code=[% credit_type.code | uri %]"><i class="fa fa-archive"></i> Archive</a> |
205 |
<form id="archive_[% credit_type.code | html %]" method="post" action="/cgi-bin/koha/admin/credit_types.pl"> |
|
|
206 |
[% INCLUDE 'csrf-token.inc' %] |
207 |
<input type="hidden" name="op" value="cud-archive" /> |
208 |
<input type="hidden" name="code" value="[% credit_type.code | html %]" /> |
209 |
</form> |
210 |
<a class="btn btn-default btn-xs archive_button" href="#" data-code="[% credit_type.code | html %]"><i class="fa fa-archive"></i> Archive</a> |
206 |
[% END %] |
211 |
[% END %] |
207 |
|
|
|
208 |
[% IF !credit_type.is_system && credit_type.archived %] |
212 |
[% IF !credit_type.is_system && credit_type.archived %] |
209 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/credit_types.pl?op=unarchive&code=[% credit_type.code | uri %]"><i class="fa fa-undo"></i> Restore</a> |
213 |
<form id="unarchive_[% credit_type.code | html %]" method="post" action="/cgi-bin/koha/admin/credit_types.pl"> |
|
|
214 |
[% INCLUDE 'csrf-token.inc' %] |
215 |
<input type="hidden" name="op" value="cud-unarchive" /> |
216 |
<input type="hidden" name="code" value="[% credit_type.code | html %]" /> |
217 |
</form> |
218 |
<a class="btn btn-default btn-xs unarchive_button" href="#" data-code="[% credit_type.code | html %]"><i class="fa fa-undo"></i> Restore</a> |
210 |
[% END %] |
219 |
[% END %] |
211 |
</td> |
220 |
</td> |
212 |
</tr> |
221 |
</tr> |
Lines 265-270
Link Here
|
265 |
|
274 |
|
266 |
//Start filtered |
275 |
//Start filtered |
267 |
$('#filter_system').click(); |
276 |
$('#filter_system').click(); |
|
|
277 |
|
278 |
$(".archive_button").on("click", function(e){ |
279 |
e.preventDefault(); |
280 |
var code = $(this).data('code'); |
281 |
$('#archive_'+code).submit(); |
282 |
}); |
283 |
|
284 |
$(".unarchive_button").on("click", function(e){ |
285 |
e.preventDefault(); |
286 |
var code = $(this).data('code'); |
287 |
$('#unarchive_'+code).submit(); |
288 |
}); |
268 |
}); |
289 |
}); |
269 |
</script> |
290 |
</script> |
270 |
[% END %] |
291 |
[% END %] |
271 |
- |
|
|