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 46-65 Link Here
46
                                <li>
46
                                <li>
47
                                    [% IF mandatory_fields.search('title') %]
47
                                    [% IF mandatory_fields.search('title') %]
48
                                        <label for="title" class="required">Title:</label>
48
                                        <label for="title" class="required">Title:</label>
49
                                        <input type="text" required="required" name="title" id="title" size="50"/>
49
                                        <input type="text" required="required" name="title" id="title" size="50" value="[% title | html %]"/>
50
                                    [% ELSE %]
50
                                    [% ELSE %]
51
                                        <label for="title">Title:</label>
51
                                        <label for="title">Title:</label>
52
                                        <input type="text" name="title" id="title" size="50"/>
52
                                        <input type="text" name="title" id="title" size="50" value="[% title | html %]"/>
53
                                    [% END %]
53
                                    [% END %]
54
                                </li>
54
                                </li>
55
55
56
                                <li>
56
                                <li>
57
                                    [% IF mandatory_fields.search('author') %]
57
                                    [% IF mandatory_fields.search('author') %]
58
                                        <label for="author" class="required">Author:</label>
58
                                        <label for="author" class="required">Author:</label>
59
                                        <input type="text" required="required" name="author" id="author" size="50"/>
59
                                        <input type="text" required="required" name="author" id="author" size="50" value="[% author | html %]"/>
60
                                    [% ELSE %]
60
                                    [% ELSE %]
61
                                        <label for="author">Author:</label>
61
                                        <label for="author">Author:</label>
62
                                        <input type="text" name="author" id="author" size="50"/>
62
                                        <input type="text" name="author" id="author" size="50" value="[% author | html %]"/>
63
                                    [% END %]
63
                                    [% END %]
64
                                </li>
64
                                </li>
65
65
Lines 96-105 Link Here
96
                                <li>
96
                                <li>
97
                                    [% IF mandatory_fields.search('pages') %]
97
                                    [% IF mandatory_fields.search('pages') %]
98
                                        <label for="pages" class="required">Pages:</label>
98
                                        <label for="pages" class="required">Pages:</label>
99
                                        <input type="text" required="required" name="pages" id="pages" size="50"/>
99
                                        <input type="text" required="required" name="pages" id="pages" size="50" value="[% pageinfo | html %]"/>
100
                                    [% ELSE %]
100
                                    [% ELSE %]
101
                                        <label for="pages">Pages:</label>
101
                                        <label for="pages">Pages:</label>
102
                                        <input type="text" name="pages" id="pages" size="50"/>
102
                                        <input type="text" name="pages" id="pages" size="50" value="[% pageinfo | html %]"/>
103
                                    [% END %]
103
                                    [% END %]
104
                                </li>
104
                                </li>
105
105
(-)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