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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt (+1 lines)
Lines 47-52 Link Here
47
                    <div class="alert alert-warning">
47
                    <div class="alert alert-warning">
48
                        [% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
48
                        [% IF errors.empty_upload %]The file you are attempting to upload has no contents.[% END %]
49
                        [% IF errors.no_file %]You did not select a file to upload.[% END %]
49
                        [% IF errors.no_file %]You did not select a file to upload.[% END %]
50
                        [% IF errors.upload_failed %]The upload failed. More information may be in the system logs.[% END %]
50
                    </div>
51
                    </div>
51
                [% END %]
52
                [% END %]
52
53
(-)a/members/files.pl (-5 / +3 lines)
Lines 87-98 else { Link Here
87
                    $file_content .= $_;
87
                    $file_content .= $_;
88
                }
88
                }
89
89
90
                $bf->AddFile(
90
                my $rv = $bf->AddFile(
91
                    name    => $filename,
91
                    name    => $filename,
92
                    type    => $mimetype,
92
                    type    => $mimetype,
93
                    content => $file_content,
93
                    content => $file_content,
94
                    description => scalar $cgi->param('description'),
94
                    description => scalar $cgi->param('description'),
95
                );
95
                );
96
                $errors{upload_failed} = 1 unless $rv;
96
            }
97
            }
97
        }
98
        }
98
        else {
99
        else {
Lines 103-111 else { Link Here
103
    }
104
    }
104
105
105
    $template->param(
106
    $template->param(
106
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )
107
        files => Koha::Patron::Files->new( borrowernumber => $borrowernumber )->GetFilesInfo(),
107
          ->GetFilesInfo(),
108
109
        errors => \%errors,
108
        errors => \%errors,
110
    );
109
    );
111
    output_html_with_http_headers $cgi, $cookie, $template->output;
110
    output_html_with_http_headers $cgi, $cookie, $template->output;
112
- 

Return to bug 37365