6 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Request article › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% BLOCK cssinclude %][% END %]
13 [% INCLUDE 'bodytag.inc' bodyid='opac-request-article' %]
14 [% INCLUDE 'masthead.inc' %]
16 [% SET disclaimer = KohaNews.get( location => "ArticleRequestsDisclaimerText", lang => lang, library => Branches.GetLoggedInBranchcode ) %]
19 <nav aria-label="breadcrumb">
20 <ul class="breadcrumb">
21 <li class="breadcrumb-item">
22 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
24 <li class="breadcrumb-item">
25 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Details for: [% biblio.title | html %]</a>
27 <li class="breadcrumb-item active" aria-current="page">
28 <a href="#">Request article</a>
33 <div class="container-fluid maincontent">
36 [% IF biblio.can_article_request( patron ) %]
37 <h1>Place article request for [% biblio.title | html %]</h1>
38 [% IF ( disclaimer && !action) %]
39 <div class="alert alert-warning">
40 [% PROCESS koha_news_block news => disclaimer %]
41 <a href="/cgi-bin/koha/opac-request-article.pl?biblionumber=[% biblio.biblionumber | uri %]&action=accept"
42 class="btn btn-sm btn-primary"><i class="fa fa-check" aria-hidden="true"></i> Accept</a>
45 [% SET article_request_type = biblio.article_request_type( patron ) %]
47 [% IF article_request_type == 'yes' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFields') %] [% END %]
48 [% IF article_request_type == 'bib_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsRecordOnly') %] [% END %]
49 [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %] [% END %]
52 <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
53 <legend class="sr-only">Place article request</legend>
54 <input type="hidden" name="action" value="create" />
55 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" />
57 <fieldset class="rows">
60 [% IF mandatory_fields.search('title') %]
61 <label for="title" class="required">Title:</label>
62 <input type="text" required="required" name="title" id="title" size="50"/>
64 <label for="title">Title:</label>
65 <input type="text" name="title" id="title" size="50"/>
70 [% IF mandatory_fields.search('author') %]
71 <label for="author" class="required">Author:</label>
72 <input type="text" required="required" name="author" id="author" size="50"/>
74 <label for="author">Author:</label>
75 <input type="text" name="author" id="author" size="50"/>
80 [% IF mandatory_fields.search('volume') %]
81 <label for="volume" class="required">Volume:</label>
82 <input type="text" required="required" name="volume" id="volume" size="50"/>
84 <label for="volume">Volume:</label>
85 <input type="text" name="volume" id="volume" size="50"/>
90 [% IF mandatory_fields.search('issue') %]
91 <label for="issue" class="required">Issue:</label>
92 <input type="text" required="required" name="issue" id="issue" size="50"/>
94 <label for="issue">Issue:</label>
95 <input type="text" name="issue" id="issue" size="50"/>
100 [% IF mandatory_fields.search('date') %]
101 <label for="date" class="required">Date:</label>
102 <input type="text" required="required" name="date" id="date" size="50"/>
104 <label for="date">Date:</label>
105 <input type="text" name="date" id="date" size="50"/>
110 [% IF mandatory_fields.search('pages') %]
111 <label for="pages" class="required">Pages:</label>
112 <input type="text" required="required" name="pages" id="pages" size="50"/>
114 <label for="pages">Pages:</label>
115 <input type="text" name="pages" id="pages" size="50"/>
120 [% IF mandatory_fields.search('chapters') %]
121 <label for="chapters" class="required">Chapters:</label>
122 <input type="text" required="required" name="chapters" id="chapters" size="50"/>
124 <label for="chapters">Chapters:</label>
125 <input type="text" name="chapters" id="chapters" size="50"/>
130 <label for="patron_notes">Notes:</label>
131 <input type="text" name="patron_notes" id="patron_notes" size="50"/>
135 <label for="branchcode">Pickup library:</label>
136 <select name="branchcode" id="branchcode" required="required">
137 [% FOREACH b IN Branches.all %]
138 [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
139 <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
141 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
149 [% IF article_request_type != 'bib_only' %]
150 <table class="copiesrow table table-bordered table-striped">
151 <caption>Select a specific item:</caption>
157 <th>Home library</th>
164 [% FOREACH item IN biblio.items %]
165 [% IF item.can_article_request( patron ) %]
168 [% IF article_request_type == 'item_only' && !checked %]
169 [% SET checked = 1 %]
170 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" checked="checked" />
172 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" />
176 [% ItemTypes.GetDescription( item.itype ) | html %]
179 [% item.barcode | html %]
182 [% Branches.GetName( item.homebranch ) | html %]
185 [% item.itemcallnumber | html %]
188 [% item.enumchron | html %]
194 [% IF article_request_type != 'item_only' %]
197 <input type="radio" name="itemnumber" value="" checked="checked"/>
208 <input type="submit" class="btn btn-primary" value="Place request" />
212 <h1 class="title">[% biblio.title | html %]</h1>
213 <div class="alert alert-info">
214 No article requests can be made for this record.
217 </div> <!-- /.col -->
218 </div> <!-- /.row -->
219 </div> <!-- / .container-fluid -->
220 </div> <!-- / .main -->
222 [% INCLUDE 'opac-bottom.inc' %]
224 [% BLOCK jsinclude %]
226 allow_submit = false;
227 $('#place-article-request').on('submit', function( event ){
228 if ( ! allow_submit ) {
229 event.preventDefault();
231 [% IF article_request_type == 'item_only' %]
232 if ( ! $("input:radio[name='itemnumber']").is(":checked") ) {
233 alert( _("Please select a specific item for this article request.") );
238 var mandatory_fields = "[% mandatory_fields | html %]";
240 if ( mandatory_fields ) m = mandatory_fields.split(",");
243 for (i = 0; i < m.length; i++) {
244 if ( ! $("#" + m[i]).val() ) {
250 alert( _("The following fields are required and not filled in: ") + f.join(", ") );
255 $('#place-article-request').submit();