Bug 7910: Give feedack when the subscriptions have been renewed

This patch adds a message to the user to let them know the subscription
have been renewed successfully.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-04-18 15:11:47 -03:00
parent 935af3eab5
commit 54944bd102
2 changed files with 24 additions and 14 deletions

View file

@ -136,7 +136,11 @@
$(".renew_subscription").on("click",function(e){
e.preventDefault();
var subscriptionid = $(this).data("subscriptionid");
popup( subscriptionid );
newin=window.open("/cgi-bin/koha/serials/subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
});
$('a.itemselection_action_renew').on("click", function(e){
e.preventDefault();
newin=window.open($(this).attr('href'),'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
});
function itemSelectionBuildRenewLink() {
var subscription_ids= new Array();
@ -176,9 +180,6 @@
});
});
function popup(subscriptionid) {
newin=window.open("subscription-renew.pl?mode=popup&subscriptionid="+subscriptionid,'popup','width=590,height=440,toolbar=false,scrollbars=yes,resize=yes');
}
</script>
[% END %]

View file

@ -11,16 +11,16 @@
<body id="ser_subscription-renew" class="ser">
<div class="container-fluid">
[% IF op == 'renew' %]
Subscription renewed.
<script type="text/javascript">
//<![CDATA[
//opener.document.location.reload();
window.opener.location.reload(false);
self.close();
//]]>
</script>
[% IF op == 'renew' OR op =='multi_renew' %]
[% IF op == 'renew' %]
<span>Subscription renewed.<span>
[% ELSE %]
<span>Subscriptions renewed.<span>
[% END %]
<div id="closewindow">
<a class="btn btn-default btn-default close" href="#">Close</a>
</div>
[% ELSE %]
<div id="bd">
<form name="f" action="/cgi-bin/koha/serials/subscription-renew.pl" method="post">
@ -46,6 +46,15 @@
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript">
$(document).ready(function(){
$(".close").on("click", function(e){
e.preventDefault();
window.opener.location.reload(false);
self.close();
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]