4 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Request article › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
11 [% INCLUDE 'bodytag.inc' bodyid='opac-request-article' %]
12 [% INCLUDE 'masthead.inc' %]
15 <nav aria-label="breadcrumb">
16 <ul class="breadcrumb">
17 <li class="breadcrumb-item">
18 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
20 <li class="breadcrumb-item">
21 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Details for: [% biblio.title | html %]</a>
23 <li class="breadcrumb-item active" aria-current="page">
24 <a href="#">Request article</a>
29 <div class="container-fluid maincontent">
32 [% IF biblio.can_article_request( patron ) %]
33 [% SET article_request_type = biblio.article_request_type( patron ) %]
35 [% IF article_request_type == 'yes' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFields') %] [% END %]
36 [% IF article_request_type == 'bib_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsRecordOnly') %] [% END %]
37 [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %] [% END %]
39 <h1>Place article request for [% biblio.title | html %]</h1>
41 <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
42 <input type="hidden" name="action" value="create" />
43 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" />
45 <fieldset class="rows">
48 [% IF mandatory_fields.search('title') %]
49 <label for="title" class="required">Title:</label>
50 <input type="text" required="required" name="title" id="title" size="50"/>
52 <label for="title">Title:</label>
53 <input type="text" name="title" id="title" size="50"/>
58 [% IF mandatory_fields.search('author') %]
59 <label for="author" class="required">Author:</label>
60 <input type="text" required="required" name="author" id="author" size="50"/>
62 <label for="author">Author:</label>
63 <input type="text" name="author" id="author" size="50"/>
68 [% IF mandatory_fields.search('volume') %]
69 <label for="volume" class="required">Volume:</label>
70 <input type="text" required="required" name="volume" id="volume" size="50"/>
72 <label for="volume">Volume:</label>
73 <input type="text" name="volume" id="volume" size="50"/>
78 [% IF mandatory_fields.search('issue') %]
79 <label for="issue" class="required">Issue:</label>
80 <input type="text" required="required" name="issue" id="issue" size="50"/>
82 <label for="issue">Issue:</label>
83 <input type="text" name="issue" id="issue" size="50"/>
88 [% IF mandatory_fields.search('date') %]
89 <label for="date" class="required">Date:</label>
90 <input type="text" required="required" name="date" id="date" size="50"/>
92 <label for="date">Date:</label>
93 <input type="text" name="date" id="date" size="50"/>
98 [% IF mandatory_fields.search('pages') %]
99 <label for="pages" class="required">Pages:</label>
100 <input type="text" required="required" name="pages" id="pages" size="50"/>
102 <label for="pages">Pages:</label>
103 <input type="text" name="pages" id="pages" size="50"/>
108 [% IF mandatory_fields.search('chapters') %]
109 <label for="chapters" class="required">Chapters:</label>
110 <input type="text" required="required" name="chapters" id="chapters" size="50"/>
112 <label for="chapters">Chapters:</label>
113 <input type="text" name="chapters" id="chapters" size="50"/>
118 <label for="patron_notes">Notes:</label>
119 <input type="text" name="patron_notes" id="patron_notes" size="50"/>
123 <label for="branchcode">Pickup library:</label>
124 <select name="branchcode" id="branchcode" required="required">
125 [% FOREACH b IN Branches.all %]
126 [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
127 <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
129 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
137 [% IF article_request_type != 'bib_only' %]
138 <table class="copiesrow table table-bordered table-striped">
139 <caption>Select a specific item:</caption>
145 <th>Home library</th>
152 [% FOREACH item IN biblio.items %]
153 [% IF item.can_article_request( patron ) %]
156 [% IF article_request_type == 'item_only' && !checked %]
157 [% SET checked = 1 %]
158 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" checked="checked" />
160 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" />
164 [% ItemTypes.GetDescription( item.itype ) | html %]
167 [% item.barcode | html %]
170 [% Branches.GetName( item.homebranch ) | html %]
173 [% item.itemcallnumber | html %]
176 [% item.enumchron | html %]
182 [% IF article_request_type != 'item_only' %]
185 <input type="radio" name="itemnumber" value="" checked="checked"/>
196 <input type="submit" class="btn btn-primary" value="Place request" />
199 <h1 class="title">[% biblio.title | html %]</h1>
200 <div class="alert alert-info">
201 No article requests can be made for this record.
204 </div> <!-- /.col -->
205 </div> <!-- /.row -->
206 </div> <!-- / .container-fluid -->
207 </div> <!-- / .main -->
209 [% INCLUDE 'opac-bottom.inc' %]
211 [% BLOCK jsinclude %]
213 allow_submit = false;
214 $('#place-article-request').on('submit', function( event ){
215 if ( ! allow_submit ) {
216 event.preventDefault();
218 [% IF article_request_type == 'item_only' %]
219 if ( ! $("input:radio[name='itemnumber']").is(":checked") ) {
220 alert( _("Please select a specific item for this article request.") );
225 var mandatory_fields = "[% mandatory_fields | html %]";
227 if ( mandatory_fields ) m = mandatory_fields.split(",");
230 for (i = 0; i < m.length; i++) {
231 if ( ! $("#" + m[i]).val() ) {
237 alert( _("The following fields are required and not filled in: ") + f.join(", ") );
242 $('#place-article-request').submit();