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

(-)a/course_reserves/add_items.pl (+7 lines)
Lines 35-40 my $cgi = new CGI; Link Here
35
my $action    = $cgi->param('action')    || '';
35
my $action    = $cgi->param('action')    || '';
36
my $course_id = $cgi->param('course_id') || '';
36
my $course_id = $cgi->param('course_id') || '';
37
my $barcode   = $cgi->param('barcode')   || '';
37
my $barcode   = $cgi->param('barcode')   || '';
38
my $return    = $cgi->param('return')    || '';
38
39
39
my $item = GetBiblioFromItemNumber( undef, $barcode );
40
my $item = GetBiblioFromItemNumber( undef, $barcode );
40
41
Lines 73-78 if ( $action eq 'lookup' ) { Link Here
73
        locations => GetAuthorisedValues('LOC'),
74
        locations => GetAuthorisedValues('LOC'),
74
        itypes    => GetItemTypes( style => 'array' ),
75
        itypes    => GetItemTypes( style => 'array' ),
75
        branches  => GetBranchesLoop(),
76
        branches  => GetBranchesLoop(),
77
        return    => $return,
76
    );
78
    );
77
79
78
} elsif ( $action eq 'add' ) {
80
} elsif ( $action eq 'add' ) {
Lines 90-95 if ( $action eq 'lookup' ) { Link Here
90
        staff_note  => $cgi->param('staff_note'),
92
        staff_note  => $cgi->param('staff_note'),
91
        public_note => $cgi->param('public_note'),
93
        public_note => $cgi->param('public_note'),
92
    );
94
    );
95
96
    if ( $return ) {
97
        print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=$return");
98
        exit;
99
    }
93
}
100
}
94
101
95
output_html_with_http_headers $cgi, $cookie, $template->output;
102
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/add_items-step2.tt (+1 lines)
Lines 18-23 Link Here
18
18
19
        <form method="post" action="/cgi-bin/koha/course_reserves/add_items.pl">
19
        <form method="post" action="/cgi-bin/koha/course_reserves/add_items.pl">
20
            <input type="hidden" name="course_id" value="[% course.course_id %]" />
20
            <input type="hidden" name="course_id" value="[% course.course_id %]" />
21
            <input type="hidden" name="return" value="[% return %]" />
21
            <input type="hidden" name="action" value="add" />
22
            <input type="hidden" name="action" value="add" />
22
23
23
            <fieldset class="rows">
24
            <fieldset class="rows">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt (-2 / +1 lines)
Lines 155-161 Link Here
155
                            <td>[% cr.public_note %]</td>
155
                            <td>[% cr.public_note %]</td>
156
156
157
                            [% IF CAN_user_coursereserves_add_reserves %]
157
                            [% IF CAN_user_coursereserves_add_reserves %]
158
                                <td><a href="add_items.pl?course_id=[% course.course_id %]&amp;barcode=[% cr.item.barcode %]&amp;action=lookup">Edit</a></td>
158
                                <td><a href="add_items.pl?course_id=[% course.course_id %]&amp;barcode=[% cr.item.barcode %]&amp;action=lookup&amp;return=[% course.course_id %]">Edit</a></td>
159
                            [% END %]
159
                            [% END %]
160
160
161
                            [% IF CAN_user_coursereserves_delete_reserves %]
161
                            [% IF CAN_user_coursereserves_delete_reserves %]
162
- 

Return to bug 13818