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

(-)a/admin/aqcontract.pl (-8 / +11 lines)
Lines 33-39 use C4::Contract; Link Here
33
my $input          = new CGI;
33
my $input          = new CGI;
34
my $contractnumber = $input->param('contractnumber');
34
my $contractnumber = $input->param('contractnumber');
35
my $booksellerid   = $input->param('booksellerid');
35
my $booksellerid   = $input->param('booksellerid');
36
my $op             = $input->param('op') || '';
36
my $op             = $input->param('op') || 'list';
37
37
38
my $bookseller = GetBookSellerFromId($booksellerid);
38
my $bookseller = GetBookSellerFromId($booksellerid);
39
39
Lines 132-148 elsif ( $op eq 'delete_confirm' ) { Link Here
132
}
132
}
133
#DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB
133
#DELETE_CONFIRMED: called by delete_confirm, used to effectively confirm deletion of data in DB
134
elsif ( $op eq 'delete_confirmed' ) {
134
elsif ( $op eq 'delete_confirmed' ) {
135
    $template->param( delete_confirmed => 1 );
135
    my $deleted = DelContract( { contractnumber => $contractnumber } );
136
136
137
    DelContract( { contractnumber => $contractnumber } );
137
    if ( $deleted ) {
138
138
        print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid");
139
    print $input->redirect("/cgi-bin/koha/acqui/supplier.pl?booksellerid=$booksellerid");
139
        exit;
140
    exit;
140
    } else {
141
        $template->param( error => 'not_deleted' );
142
        $op = 'list';
143
    }
141
144
142
    # END $OP eq DELETE_CONFIRMED
145
    # END $OP eq LIST
143
}
146
}
144
# DEFAULT: Builds a list of contracts and displays them
147
# DEFAULT: Builds a list of contracts and displays them
145
else {
148
if ( $op eq 'list' ) {
146
    $template->param(else => 1);
149
    $template->param(else => 1);
147
150
148
    # get contracts
151
    # get contracts
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqcontract.tt (-1 / +5 lines)
Lines 90-95 function Check(ff) { Link Here
90
    <div class="yui-b">
90
    <div class="yui-b">
91
91
92
[% INCLUDE 'acquisitions-toolbar.inc' %]
92
[% INCLUDE 'acquisitions-toolbar.inc' %]
93
94
[% IF error == 'not_deleted' %]
95
    <div class="dialog alert">Contract has not been deleted. Maybe a basket linked to this contract exists.</div>
96
[% END %]
97
93
                [% IF ( add_form ) %]
98
                [% IF ( add_form ) %]
94
                    <form name="Aform" action="[% script_name %]" method="post">
99
                    <form name="Aform" action="[% script_name %]" method="post">
95
                        <input type="hidden" name="op" value="add_validate" />
100
                        <input type="hidden" name="op" value="add_validate" />
96
- 

Return to bug 12508