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.tmpl (-5 / +4 lines)
Lines 39-46 Link Here
39
<!-- TMPL_UNLESS name="grouped" -->
39
<!-- TMPL_UNLESS name="grouped" -->
40
<script type="text/javascript">
40
<script type="text/javascript">
41
//<![CDATA[
41
//<![CDATA[
42
            function confirm_reopen() {
42
            function confirm_reopen(skip) {
43
                var is_confirmed = confirm(_('Are you sure you want to reopen this basket?'));
43
                var is_confirmed = skip || confirm(_('Are you sure you want to reopen this basket?'));
44
                if (is_confirmed) {
44
                if (is_confirmed) {
45
                    window.location = "<!-- TMPL_VAR name="script_name" -->?op=reopen&basketno=<!-- TMPL_VAR name="basketno" -->";
45
                    window.location = "<!-- TMPL_VAR name="script_name" -->?op=reopen&basketno=<!-- TMPL_VAR name="basketno" -->";
46
                }
46
                }
Lines 95-101 Link Here
95
                    <li><a href="basketheader.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
95
                    <li><a href="basketheader.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;op=add_form" class="button" id="basketheadbutton">Edit basket header information</a></li>
96
                    <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li>
96
                    <li><a href="javascript:confirm_deletion();" class="button" id="delbasketbutton">Delete this basket</a></li>
97
                    <!-- TMPL_IF name="unclosable" -->
97
                    <!-- TMPL_IF name="unclosable" -->
98
                        <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>
99
                    <!-- TMPL_ELSIF name="uncertainprices" -->
98
                    <!-- TMPL_ELSIF name="uncertainprices" -->
100
                        <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=<!-- TMPL_VAR name="booksellerid" -->&amp;owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
99
                        <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=<!-- TMPL_VAR name="booksellerid" -->&amp;owner=1" class="button" id="uncertpricesbutton">Uncertain prices</a></li>
101
                    <!-- TMPL_ELSE -->
100
                    <!-- TMPL_ELSE -->
Lines 121-127 Link Here
121
                        //]]>
120
                        //]]>
122
                    </script>
121
                    </script>
123
                        <ul id="toolbar-list" class="toolbar">
122
                        <ul id="toolbar-list" class="toolbar">
124
                            <li><a href="javascript:confirm_reopen();" class="button" id="reopenbutton">Reopen this basket</a></li>
123
                            <li><a href="javascript:confirm_reopen(<!-- TMPL_VAR NAME="skip_confirm_reopen" -->);" class="button" id="reopenbutton">Reopen this basket</a></li>
125
                        </ul>
124
                        </ul>
126
                </div>
125
                </div>
127
                <!-- /TMPL_UNLESS -->
126
                <!-- /TMPL_UNLESS -->
Lines 313-319 Link Here
313
        <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
312
        <form action="/cgi-bin/koha/acqui/basket.pl" class="confirm">
314
            <h1>Are you sure you want to close basket <!-- TMPL_VAR name="basketname" -->?</h1>
313
            <h1>Are you sure you want to close basket <!-- TMPL_VAR name="basketname" -->?</h1>
315
            <p>
314
            <p>
316
            <label for="createbasketgroup">create a purchase order now?</label>
315
            <label for="createbasketgroup">Attach this basket to a new basket group with the same name</label>
317
            <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
316
            <input type="checkbox" id="createbasketgroup" name="createbasketgroup"/>
318
            </p>
317
            </p>
319
            <input type="hidden" id="basketno" value="<!-- TMPL_VAR name="basketno" -->" name="basketno" />
318
            <input type="hidden" id="basketno" value="<!-- TMPL_VAR name="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