View | Details | Raw Unified | Return to bug 4959
Collapse All | Expand All

(-)a/acqui/basket.pl (-2 / +5 lines)
Lines 90-95 if (!defined $op) { Link Here
90
    $op = q{};
90
    $op = q{};
91
}
91
}
92
92
93
my $confirm_pref= C4::Context->preference("BasketConfirmations") || '1';
94
$template->param( skip_confirm_reopen => 1) if $confirm_pref eq '2';
95
93
if ( $op eq 'delete_confirm' ) {
96
if ( $op eq 'delete_confirm' ) {
94
    my $basketno = $query->param('basketno');
97
    my $basketno = $query->param('basketno');
95
    DelBasket($basketno);
98
    DelBasket($basketno);
Lines 144-150 if ( $op eq 'delete_confirm' ) { Link Here
144
    print GetBasketAsCSV($query->param('basketno'));
147
    print GetBasketAsCSV($query->param('basketno'));
145
    exit;
148
    exit;
146
} elsif ($op eq 'close') {
149
} elsif ($op eq 'close') {
147
    my $confirm = $query->param('confirm');
150
    my $confirm = $query->param('confirm') || $confirm_pref eq '2';
148
    if ($confirm) {
151
    if ($confirm) {
149
        my $basketno = $query->param('basketno');
152
        my $basketno = $query->param('basketno');
150
        my $booksellerid = $query->param('booksellerid');
153
        my $booksellerid = $query->param('booksellerid');
Lines 197-203 if ( $op eq 'delete_confirm' ) { Link Here
197
    if ($basket->{closedate} && haspermission({ flagsrequired   => { acquisition => 'group_manage'} })) {
200
    if ($basket->{closedate} && haspermission({ flagsrequired   => { acquisition => 'group_manage'} })) {
198
        $basketgroups = GetBasketgroups($basket->{booksellerid});
201
        $basketgroups = GetBasketgroups($basket->{booksellerid});
199
        for my $bg ( @{$basketgroups} ) {
202
        for my $bg ( @{$basketgroups} ) {
200
            if ($basket->{basketgroupid} == $bg->{id}){
203
            if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){
201
                $bg->{default} = 1;
204
                $bg->{default} = 1;
202
            }
205
            }
203
        }
206
        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-5 / +4 lines)
Lines 46-53 Link Here
46
[% UNLESS ( grouped ) %]
46
[% UNLESS ( grouped ) %]
47
<script type="text/javascript">
47
<script type="text/javascript">
48
//<![CDATA[
48
//<![CDATA[
49
            function confirm_reopen() {
49
            function confirm_reopen(skip) {
50
                var is_confirmed = confirm(_('Are you sure you want to reopen this basket?'));
50
                var is_confirmed = skip || confirm(_('Are you sure you want to reopen this basket?'));
51
                if (is_confirmed) {
51
                if (is_confirmed) {
52
                    window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
52
                    window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
53
                }
53
                }
Lines 102-108 Link Here
102
                    <li><a href="basketheader.pl?basketno=[% basketno %]&amp;op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
102
                    <li><a href="basketheader.pl?basketno=[% basketno %]&amp;op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
103
                    <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li>
103
                    <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li>
104
                    [% IF ( unclosable ) %]
104
                    [% IF ( unclosable ) %]
105
                        <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>
106
                    [% ELSIF ( uncertainprices ) %]
105
                    [% ELSIF ( uncertainprices ) %]
107
                        <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
106
                        <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&amp;owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
108
                    [% ELSE %]
107
                    [% ELSE %]
Lines 128-134 Link Here
128
                        //]]>
127
                        //]]>
129
                    </script>
128
                    </script>
130
                        <ul id="toolbar-list" class="toolbar">
129
                        <ul id="toolbar-list" class="toolbar">
131
                            <li><a href="javascript:confirm_reopen();" class="button" id="reopenbutton">Reopen this basket</a></li>
130
                            <li><a href="javascript:confirm_reopen([% skip_confirm_reopen %]);" class="button" id="reopenbutton">Reopen this basket</a></li>
132
                        </ul>
131
                        </ul>
133
                </div>
132
                </div>
134
                [% END %]
133
                [% END %]
Lines 308-314 Link Here
308
        <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
307
        <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
309
            <h1>Are you sure you want to close basket [% basketname %]?</h1>
308
            <h1>Are you sure you want to close basket [% basketname %]?</h1>
310
            <p>
309
            <p>
311
            <label for="createbasketgroup">create a purchase order now?</label>
310
            <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
312
            <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
311
            <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
313
            </p>
312
            </p>
314
            <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
313
            <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-1 / +7 lines)
Lines 9-14 Acquisitions: Link Here
9
              receiving: receiving an order.
9
              receiving: receiving an order.
10
              cataloguing: cataloging the record.
10
              cataloguing: cataloging the record.
11
    -
11
    -
12
        - When closing or reopening a basket,
13
        - pref: BasketConfirmations
14
          default: 1
15
          choices:
16
              1: always ask for confirmation.
17
              2: do not ask for confirmation.
18
    -
12
        - Display currencies using the following format 
19
        - Display currencies using the following format 
13
        - pref: CurrencyFormat
20
        - pref: CurrencyFormat
14
          choices:
21
          choices:
15
- 

Return to bug 4959