$op = q{};
}
+my $confirm_pref= C4::Context->preference("BasketConfirmations") || '1';
+$template->param( skip_confirm_reopen => 1) if $confirm_pref eq '2';
+
if ( $op eq 'delete_confirm' ) {
my $basketno = $query->param('basketno');
DelBasket($basketno);
print GetBasketAsCSV($query->param('basketno'));
exit;
} elsif ($op eq 'close') {
- my $confirm = $query->param('confirm');
+ my $confirm = $query->param('confirm') || $confirm_pref eq '2';
if ($confirm) {
my $basketno = $query->param('basketno');
my $booksellerid = $query->param('booksellerid');
if ($basket->{closedate} && haspermission({ flagsrequired => { acquisition => 'group_manage'} })) {
$basketgroups = GetBasketgroups($basket->{booksellerid});
for my $bg ( @{$basketgroups} ) {
- if ($basket->{basketgroupid} == $bg->{id}){
+ if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
$bg->{default} = 1;
}
}
[% UNLESS ( grouped ) %]
<script type="text/javascript">
//<![CDATA[
- function confirm_reopen() {
- var is_confirmed = confirm(_('Are you sure you want to reopen this basket?'));
+ function confirm_reopen(skip) {
+ var is_confirmed = skip || confirm(_('Are you sure you want to reopen this basket?'));
if (is_confirmed) {
window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
}
<li><a href="basketheader.pl?basketno=[% basketno %]&op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
<li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li>
[% IF ( unclosable ) %]
- <li><button onclick="confirm_close()" class="yui-button-disabled" id="closebutton" type="button" disabled="disabled" title="You can not close this basket">Can not close basket</button></li>
[% ELSIF ( uncertainprices ) %]
<li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
[% ELSE %]
//]]>
</script>
<ul id="toolbar-list" class="toolbar">
- <li><a href="javascript:confirm_reopen();" class="button" id="reopenbutton">Reopen this basket</a></li>
+ <li><a href="javascript:confirm_reopen([% skip_confirm_reopen %]);" class="button" id="reopenbutton">Reopen this basket</a></li>
</ul>
</div>
[% END %]
<form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
<h1>Are you sure you want to close basket [% basketname %]?</h1>
<p>
- <label for="createbasketgroup">create a purchase order now?</label>
+ <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
<input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
</p>
<input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
receiving: receiving an order.
cataloguing: cataloging the record.
-
+ - When closing or reopening a basket,
+ - pref: BasketConfirmations
+ default: 1
+ choices:
+ 1: always ask for confirmation.
+ 2: do not ask for confirmation.
+ -
- Display currencies using the following format
- pref: CurrencyFormat
choices: