|
Lines 762-771
Link Here
|
| 762 |
[% END # / IF SuspendHoldsOpac %] |
762 |
[% END # / IF SuspendHoldsOpac %] |
| 763 |
<td class="modify"> |
763 |
<td class="modify"> |
| 764 |
[% IF ( RESERVE.is_cancelable_from_opac ) %] |
764 |
[% IF ( RESERVE.is_cancelable_from_opac ) %] |
| 765 |
<form action="/cgi-bin/koha/opac-modrequest.pl" method="post"> |
765 |
<form id="delete_hold_[% RESERVE.reserve_id | html %]" action="/cgi-bin/koha/opac-modrequest.pl" method="post"> |
| 766 |
<input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber | html %]" /> |
766 |
<input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber | html %]" /> |
| 767 |
<input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id | html %]" /> |
767 |
<input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id | html %]" /> |
| 768 |
<button type="submit" name="submit" class="btn btn-xs btn-danger" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"><i class="fa fa-remove"></i> Cancel</button></form> |
768 |
<button data-title="[% RESERVE.biblio.title | html %] [% FOREACH s IN RESERVE.biblio.subtitles %] [% s | html %] [% END %] [% RESERVE.item.enumchron | html %]" data-reserve_id="[% RESERVE.reserve_id | html %]" type="submit" class="btn btn-sm btn-danger btn-delete-hold"><i class="fa fa-remove"></i> Cancel</button></form> |
| 769 |
[% END %] |
769 |
[% END %] |
| 770 |
</td> |
770 |
</td> |
| 771 |
</tr> |
771 |
</tr> |
|
Lines 775-782
Link Here
|
| 775 |
|
775 |
|
| 776 |
[% IF SuspendHoldsOpac %] |
776 |
[% IF SuspendHoldsOpac %] |
| 777 |
<div> |
777 |
<div> |
| 778 |
<form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> |
778 |
<form class="form-inline" id="suspend_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> |
| 779 |
<button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);"><i class="fa fa-pause"></i> Suspend all holds</button> |
779 |
<button type="submit" id="suspend_all_submit" class="btn"><i class="fa fa-pause"></i> Suspend all holds</button> |
| 780 |
<input type="hidden" name="suspend" value="1" /> |
780 |
<input type="hidden" name="suspend" value="1" /> |
| 781 |
|
781 |
|
| 782 |
[% IF AutoResumeSuspendedHolds %] |
782 |
[% IF AutoResumeSuspendedHolds %] |
|
Lines 788-795
Link Here
|
| 788 |
</div> |
788 |
</div> |
| 789 |
<br/> |
789 |
<br/> |
| 790 |
<div> |
790 |
<div> |
| 791 |
<form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> |
791 |
<form id="resume_all_holds" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> |
| 792 |
<button type="submit" name="submit" class="btn" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);"><i class="fa fa-play"></i> Resume all suspended holds</button> |
792 |
<button type="submit" id="resume_all_submit" class="btn"><i class="fa fa-play"></i> Resume all suspended holds</button> |
| 793 |
<input type="hidden" name="suspend" value="0" /> |
793 |
<input type="hidden" name="suspend" value="0" /> |
| 794 |
</form> |
794 |
</form> |
| 795 |
</div> |
795 |
</div> |
|
Lines 885-891
Link Here
|
| 885 |
|
885 |
|
| 886 |
<td class="article-request-cancel"> |
886 |
<td class="article-request-cancel"> |
| 887 |
<span class="tdlabel">Cancel:</span> |
887 |
<span class="tdlabel">Cancel:</span> |
| 888 |
<a class="btn btn-xs btn-danger" href="opac-article-request-cancel.pl?id=[% ar.id | html %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_ARTREQ);"><i class="fa fa-remove"></i> Cancel</a> |
888 |
<form action="/cgi-bin/koha/opac-article-request-cancel.pl" id="delete_article_request_[% ar.id | html %]"> |
|
|
889 |
<input type="hidden" name="id" value="[% ar.id | html %]" /> |
| 890 |
<button data-title="[% ar.biblio.title | html %] [% ar.item.enumchron | html %]" data-article-request_id="[% ar.id | html %]" type="submit" class="btn btn-sm btn-danger btn-delete-article-request"><i class="fa fa-remove"></i> Cancel</button> |
| 891 |
</form> |
| 889 |
</td> |
892 |
</td> |
| 890 |
</tr> |
893 |
</tr> |
| 891 |
[% END %] |
894 |
[% END %] |
|
Lines 917-933
Link Here
|
| 917 |
[% END %] |
920 |
[% END %] |
| 918 |
|
921 |
|
| 919 |
[% INCLUDE 'opac-bottom.inc' %] |
922 |
[% INCLUDE 'opac-bottom.inc' %] |
| 920 |
|
|
|
| 921 |
|
| 922 |
[% BLOCK jsinclude %] |
923 |
[% BLOCK jsinclude %] |
| 923 |
[% INCLUDE 'calendar.inc' %] |
924 |
[% INCLUDE 'calendar.inc' %] |
| 924 |
[% INCLUDE 'datatables.inc' %] |
925 |
[% INCLUDE 'datatables.inc' %] |
| 925 |
<script> |
926 |
<script> |
| 926 |
//<![CDATA[ |
|
|
| 927 |
var MSG_CONFIRM_DELETE_ARTREQ = _("Are you sure you want to cancel this article request?"); |
| 928 |
var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); |
| 929 |
var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?"); |
| 930 |
var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended holds?"); |
| 931 |
|
927 |
|
| 932 |
$(document).ready(function(){ |
928 |
$(document).ready(function(){ |
| 933 |
$('#opac-user-views').tabs(); |
929 |
$('#opac-user-views').tabs(); |
|
Lines 936-941
Link Here
|
| 936 |
$(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs"); |
932 |
$(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs"); |
| 937 |
$(".suspend-until").prop("readonly",1); |
933 |
$(".suspend-until").prop("readonly",1); |
| 938 |
|
934 |
|
|
|
935 |
$(".btn-delete-hold").on("click", function(e){ |
| 936 |
e.preventDefault(); |
| 937 |
var hold_title = $(this).data("title"); |
| 938 |
var reserve_id = $(this).data("reserve_id"); |
| 939 |
var body = "<p><strong>" + hold_title + "</strong></p>"; |
| 940 |
confirmModal( hold_title, _("Are you sure you want to cancel this hold?"), _("Yes, cancel hold"), _("No, do not cancel hold"), function( result ){ |
| 941 |
if( result ){ |
| 942 |
$("#delete_hold_" + reserve_id ).submit(); |
| 943 |
} |
| 944 |
} |
| 945 |
); |
| 946 |
}); |
| 947 |
|
| 948 |
$(".btn-delete-article-request").on("click", function(e){ |
| 949 |
e.preventDefault(); |
| 950 |
var hold_title = $(this).data("title"); |
| 951 |
var article_request_id = $(this).data("article-request_id"); |
| 952 |
var body = "<p><strong>" + hold_title + "</strong></p>"; |
| 953 |
confirmModal( hold_title, _("Are you sure you want to cancel this article request?"), _("Yes, cancel article request"), _("No, do not cancel article request"), function( result ){ |
| 954 |
if( result ){ |
| 955 |
$("#delete_article_request_" + article_request_id ).submit(); |
| 956 |
} |
| 957 |
} |
| 958 |
); |
| 959 |
}); |
| 960 |
|
| 961 |
$("#suspend_all_submit").on("click", function(e){ |
| 962 |
e.preventDefault(); |
| 963 |
var title = _("Are you sure you want to suspend all holds?"); |
| 964 |
var body = _("All holds will be suspended."); |
| 965 |
confirmModal( body, title, _("Yes, suspend all holds"), "", function( result ){ |
| 966 |
if( result ){ |
| 967 |
$("#suspend_all_holds").submit(); |
| 968 |
} |
| 969 |
} |
| 970 |
); |
| 971 |
}); |
| 972 |
|
| 973 |
$("#resume_all_submit").on("click", function(e){ |
| 974 |
e.preventDefault(); |
| 975 |
var title = _("Are you sure you want to resume all suspended holds?"); |
| 976 |
var body = _("All holds will resume."); |
| 977 |
confirmModal( body, title, _("Yes, resume all holds"), _("No, do not resume holds"), function( result ){ |
| 978 |
if( result ){ |
| 979 |
$("#resume_all_holds").submit(); |
| 980 |
} |
| 981 |
} |
| 982 |
); |
| 983 |
}); |
| 984 |
|
| 939 |
var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table"); |
985 |
var dTables = $("#checkoutst,#holdst,#overduest,#opac-user-relative-issues-table"); |
| 940 |
dTables.each(function(){ |
986 |
dTables.each(function(){ |
| 941 |
var thIndex = $(this).find("th.psort").index(); |
987 |
var thIndex = $(this).find("th.psort").index(); |