Bug 36195: serials/routing-preview.pl - Fix save and preview
No idea why we are passing issue_escaped instead of the id, but this patch fixes the regression. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
4032da3f96
commit
68a615f6ee
4 changed files with 26 additions and 26 deletions
|
@ -82,19 +82,6 @@
|
|||
</div> <!-- /.row -->
|
||||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#save_and_preview").on("click",function(e){
|
||||
e.preventDefault();
|
||||
print_slip( $("#subscriptionid").val(), $("#issue_escaped").val() );
|
||||
});
|
||||
});
|
||||
function print_slip(subscriptionid,issue){
|
||||
var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
|
||||
window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
|
||||
window.location.href='subscription-detail.pl?subscriptionid=' + subscriptionid;
|
||||
}
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'intranet-bottom.inc' %]
|
||||
|
|
|
@ -488,6 +488,12 @@
|
|||
table.fnFilter( '', 4 ); // Not filter, display all columns
|
||||
});
|
||||
$("#show_all_orders").click();
|
||||
|
||||
[% IF print_routing_list_issue %]
|
||||
var myurl = '/cgi-bin/koha/serials/routing-preview.pl?op=print&subscriptionid=[% subscriptionid | uri %]&issue=[% print_routing_list_issue | uri %]';
|
||||
window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
|
||||
[% END %]
|
||||
|
||||
});
|
||||
|
||||
function mana_comment_close(){
|
||||
|
|
|
@ -104,20 +104,26 @@ if($op eq 'cud-save_and_preview'){
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/routing-preview-slip.tt",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
flagsrequired => {serials => '*'},
|
||||
});
|
||||
print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid&print_routing_list_issue=" . $query->param('issue_escaped'));
|
||||
exit;
|
||||
} elsif ( $op eq 'print' ) {
|
||||
( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "serials/routing-preview-slip.tt",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
flagsrequired => { serials => '*' },
|
||||
}
|
||||
);
|
||||
} else {
|
||||
($template, $loggedinuser, $cookie)
|
||||
= get_template_and_user({template_name => "serials/routing-preview.tt",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
flagsrequired => {serials => '*'},
|
||||
});
|
||||
( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "serials/routing-preview.tt",
|
||||
query => $query,
|
||||
type => "intranet",
|
||||
flagsrequired => { serials => '*' },
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$template->param( libraryname => $library->branchname ) if $library;
|
||||
|
|
|
@ -166,6 +166,7 @@ $template->param(
|
|||
orders_grouped => $orders_grouped,
|
||||
(uc(C4::Context->preference("marcflavour"))) => 1,
|
||||
mana_comments => $subs->{comments},
|
||||
print_routing_list_issue => scalar $query->param('print_routing_list_issue'),
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
Loading…
Reference in a new issue