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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt (-6 / +6 lines)
Lines 36-55 Link Here
36
                        <li>
36
                        <li>
37
                            [% IF mandatory_fields.search('title') %]
37
                            [% IF mandatory_fields.search('title') %]
38
                                <label for="title" class="required">Title:</label>
38
                                <label for="title" class="required">Title:</label>
39
                                <input type="text" required="required" name="title" id="title" size="50"/>
39
                                <input type="text" required="required" name="title" id="title" size="50" value="[% title | html %]"/>
40
                            [% ELSE %]
40
                            [% ELSE %]
41
                                <label for="title">Title:</label>
41
                                <label for="title">Title:</label>
42
                                <input type="text" name="title" id="title" size="50"/>
42
                                <input type="text" name="title" id="title" size="50" value="[% title | html %]"/>
43
                            [% END %]
43
                            [% END %]
44
                        </li>
44
                        </li>
45
45
46
                        <li>
46
                        <li>
47
                            [% IF mandatory_fields.search('author') %]
47
                            [% IF mandatory_fields.search('author') %]
48
                                <label for="author" class="required">Author:</label>
48
                                <label for="author" class="required">Author:</label>
49
                                <input type="text" required="required" name="author" id="author" size="50"/>
49
                                <input type="text" required="required" name="author" id="author" size="50" value="[% author | html %]"/>
50
                            [% ELSE %]
50
                            [% ELSE %]
51
                                <label for="author">Author:</label>
51
                                <label for="author">Author:</label>
52
                                <input type="text" name="author" id="author" size="50"/>
52
                                <input type="text" name="author" id="author" size="50" value="[% author | html %]"/>
53
                            [% END %]
53
                            [% END %]
54
                        </li>
54
                        </li>
55
55
Lines 86-95 Link Here
86
                        <li>
86
                        <li>
87
                            [% IF mandatory_fields.search('pages') %]
87
                            [% IF mandatory_fields.search('pages') %]
88
                                <label for="pages" class="required">Pages:</label>
88
                                <label for="pages" class="required">Pages:</label>
89
                                <input type="text" required="required" name="pages" id="pages" size="50"/>
89
                                <input type="text" required="required" name="pages" id="pages" size="50" value="[% pageinfo | html %]"/>
90
                            [% ELSE %]
90
                            [% ELSE %]
91
                                <label for="pages">Pages:</label>
91
                                <label for="pages">Pages:</label>
92
                                <input type="text" name="pages" id="pages" size="50"/>
92
                                <input type="text" name="pages" id="pages" size="50" value="[% pageinfo | html %]"/>
93
                            [% END %]
93
                            [% END %]
94
                        </li>
94
                        </li>
95
95
(-)a/opac/opac-request-article.pl (-2 / +9 lines)
Lines 40-45 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
40
40
41
my $action = $cgi->param('action') || q{};
41
my $action = $cgi->param('action') || q{};
42
my $biblionumber = $cgi->param('biblionumber');
42
my $biblionumber = $cgi->param('biblionumber');
43
my $biblio = Koha::Biblios->find($biblionumber);
43
44
44
if ( $action eq 'create' ) {
45
if ( $action eq 'create' ) {
45
    my $branchcode = $cgi->param('branchcode');
46
    my $branchcode = $cgi->param('branchcode');
Lines 73-81 if ( $action eq 'create' ) { Link Here
73
74
74
    print $cgi->redirect("/cgi-bin/koha/opac-user.pl#opac-user-article-requests");
75
    print $cgi->redirect("/cgi-bin/koha/opac-user.pl#opac-user-article-requests");
75
    exit;
76
    exit;
77
} elsif ( !$action ) {
78
    # Should we redirect?
79
    # Conditions: no items, host item entry (MARC21 773)
80
    my ( $host, $pageinfo ) = $biblio->host_record({ no_items => 1 });
81
    if( $host ) {
82
        $template->param( pageinfo => $pageinfo, title => $biblio->title, author => $biblio->author );
83
        $biblio = $host;
84
    }
76
}
85
}
77
86
78
my $biblio = Koha::Biblios->find($biblionumber);
79
my $patron = Koha::Patrons->find($borrowernumber);
87
my $patron = Koha::Patrons->find($borrowernumber);
80
88
81
$template->param(
89
$template->param(
82
- 

Return to bug 20310