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 48-67 Link Here
48
                                <li>
48
                                <li>
49
                                    [% IF mandatory_fields.search('title') %]
49
                                    [% IF mandatory_fields.search('title') %]
50
                                        <label for="title" class="required">Title:</label>
50
                                        <label for="title" class="required">Title:</label>
51
                                        <input type="text" required="required" name="title" id="title" size="50"/>
51
                                        <input type="text" required="required" name="title" id="title" size="50" value="[% title | html %]"/>
52
                                    [% ELSE %]
52
                                    [% ELSE %]
53
                                        <label for="title">Title:</label>
53
                                        <label for="title">Title:</label>
54
                                        <input type="text" name="title" id="title" size="50"/>
54
                                        <input type="text" name="title" id="title" size="50" value="[% title | html %]"/>
55
                                    [% END %]
55
                                    [% END %]
56
                                </li>
56
                                </li>
57
57
58
                                <li>
58
                                <li>
59
                                    [% IF mandatory_fields.search('author') %]
59
                                    [% IF mandatory_fields.search('author') %]
60
                                        <label for="author" class="required">Author:</label>
60
                                        <label for="author" class="required">Author:</label>
61
                                        <input type="text" required="required" name="author" id="author" size="50"/>
61
                                        <input type="text" required="required" name="author" id="author" size="50" value="[% author | html %]"/>
62
                                    [% ELSE %]
62
                                    [% ELSE %]
63
                                        <label for="author">Author:</label>
63
                                        <label for="author">Author:</label>
64
                                        <input type="text" name="author" id="author" size="50"/>
64
                                        <input type="text" name="author" id="author" size="50" value="[% author | html %]"/>
65
                                    [% END %]
65
                                    [% END %]
66
                                </li>
66
                                </li>
67
67
Lines 98-107 Link Here
98
                                <li>
98
                                <li>
99
                                    [% IF mandatory_fields.search('pages') %]
99
                                    [% IF mandatory_fields.search('pages') %]
100
                                        <label for="pages" class="required">Pages:</label>
100
                                        <label for="pages" class="required">Pages:</label>
101
                                        <input type="text" required="required" name="pages" id="pages" size="50"/>
101
                                        <input type="text" required="required" name="pages" id="pages" size="50" value="[% pageinfo | html %]"/>
102
                                    [% ELSE %]
102
                                    [% ELSE %]
103
                                        <label for="pages">Pages:</label>
103
                                        <label for="pages">Pages:</label>
104
                                        <input type="text" name="pages" id="pages" size="50"/>
104
                                        <input type="text" name="pages" id="pages" size="50" value="[% pageinfo | html %]"/>
105
                                    [% END %]
105
                                    [% END %]
106
                                </li>
106
                                </li>
107
107
(-)a/opac/opac-request-article.pl (-2 / +9 lines)
Lines 39-44 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
39
39
40
my $action = $cgi->param('action') || q{};
40
my $action = $cgi->param('action') || q{};
41
my $biblionumber = $cgi->param('biblionumber');
41
my $biblionumber = $cgi->param('biblionumber');
42
my $biblio = Koha::Biblios->find($biblionumber);
42
43
43
if ( $action eq 'create' ) {
44
if ( $action eq 'create' ) {
44
    my $branchcode = $cgi->param('branchcode');
45
    my $branchcode = $cgi->param('branchcode');
Lines 74-82 if ( $action eq 'create' ) { Link Here
74
75
75
    print $cgi->redirect("/cgi-bin/koha/opac-user.pl#opac-user-article-requests");
76
    print $cgi->redirect("/cgi-bin/koha/opac-user.pl#opac-user-article-requests");
76
    exit;
77
    exit;
78
} elsif ( !$action ) {
79
    # Should we redirect?
80
    # Conditions: no items, host item entry (MARC21 773)
81
    my ( $host, $pageinfo ) = $biblio->host_record({ no_items => 1 });
82
    if( $host ) {
83
        $template->param( pageinfo => $pageinfo, title => $biblio->title, author => $biblio->author );
84
        $biblio = $host;
85
    }
77
}
86
}
78
87
79
my $biblio = Koha::Biblios->find($biblionumber);
80
my $patron = Koha::Patrons->find($borrowernumber);
88
my $patron = Koha::Patrons->find($borrowernumber);
81
89
82
$template->param(
90
$template->param(
83
- 

Return to bug 20310