4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog › Request article</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% BLOCK cssinclude %][% END %]
10 [% INCLUDE 'bodytag.inc' bodyid='opac-request-article' %]
11 [% INCLUDE 'masthead.inc' %]
14 <nav aria-label="breadcrumb">
15 <ul class="breadcrumb">
16 <li class="breadcrumb-item">
17 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
19 <li class="breadcrumb-item">
20 <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Details for: [% biblio.title | html %]</a>
22 <li class="breadcrumb-item active" aria-current="page">
23 <a href="#">Request article</a>
28 <div class="container-fluid maincontent">
31 [% IF biblio.can_article_request( patron ) %]
32 [% SET article_request_type = biblio.article_request_type( patron ) %]
34 [% IF article_request_type == 'yes' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFields') %] [% END %]
35 [% IF article_request_type == 'bib_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsRecordOnly') %] [% END %]
36 [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %] [% END %]
38 <h3>Place article request for [% biblio.title | html %]</h3>
40 <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
41 <input type="hidden" name="action" value="create" />
42 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" />
44 <fieldset class="rows">
47 [% IF mandatory_fields.search('title') %]
48 <label for="title" class="required">Title:</label>
49 <input type="text" required="required" name="title" id="title" size="50"/>
51 <label for="title">Title:</label>
52 <input type="text" name="title" id="title" size="50"/>
57 [% IF mandatory_fields.search('author') %]
58 <label for="author" class="required">Author:</label>
59 <input type="text" required="required" name="author" id="author" size="50"/>
61 <label for="author">Author:</label>
62 <input type="text" name="author" id="author" size="50"/>
67 [% IF mandatory_fields.search('volume') %]
68 <label for="volume" class="required">Volume:</label>
69 <input type="text" required="required" name="volume" id="volume" size="50"/>
71 <label for="volume">Volume:</label>
72 <input type="text" name="volume" id="volume" size="50"/>
77 [% IF mandatory_fields.search('issue') %]
78 <label for="issue" class="required">Issue:</label>
79 <input type="text" required="required" name="issue" id="issue" size="50"/>
81 <label for="issue">Issue:</label>
82 <input type="text" name="issue" id="issue" size="50"/>
87 [% IF mandatory_fields.search('date') %]
88 <label for="date" class="required">Date:</label>
89 <input type="text" required="required" name="date" id="date" size="50"/>
91 <label for="date">Date:</label>
92 <input type="text" name="date" id="date" size="50"/>
97 [% IF mandatory_fields.search('pages') %]
98 <label for="pages" class="required">Pages:</label>
99 <input type="text" required="required" name="pages" id="pages" size="50"/>
101 <label for="pages">Pages:</label>
102 <input type="text" name="pages" id="pages" size="50"/>
107 [% IF mandatory_fields.search('chapters') %]
108 <label for="chapters" class="required">Chapters:</label>
109 <input type="text" required="required" name="chapters" id="chapters" size="50"/>
111 <label for="chapters">Chapters:</label>
112 <input type="text" name="chapters" id="chapters" size="50"/>
117 <label for="patron_notes">Notes:</label>
118 <input type="text" name="patron_notes" id="patron_notes" size="50"/>
122 <label for="branchcode">Pickup library:</label>
123 <select name="branchcode" id="branchcode" required="required">
124 [% FOREACH b IN Branches.all %]
125 [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
126 <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
128 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
136 [% IF article_request_type != 'bib_only' %]
137 <table class="copiesrow table table-bordered table-striped">
138 <caption>Select a specific item:</caption>
144 <th>Home library</th>
151 [% FOREACH item IN biblio.items %]
152 [% IF item.can_article_request( patron ) %]
155 [% IF article_request_type == 'item_only' && !checked %]
156 [% SET checked = 1 %]
157 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" checked="checked" />
159 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" />
163 [% ItemTypes.GetDescription( item.itype ) | html %]
166 [% item.barcode | html %]
169 [% Branches.GetName( item.homebranch ) | html %]
172 [% item.itemcallnumber | html %]
175 [% item.enumchron | html %]
181 [% IF article_request_type != 'item_only' %]
184 <input type="radio" name="itemnumber" value="" checked="checked"/>
195 <input type="submit" class="btn btn-primary" value="Place request" />
198 <h1 class="title">[% biblio.title | html %]</h1>
199 <div class="alert alert-info">
200 No article requests can be made for this record.
203 </div> <!-- /.col -->
204 </div> <!-- /.row -->
205 </div> <!-- / .container-fluid -->
206 </div> <!-- / .main -->
208 [% INCLUDE 'opac-bottom.inc' %]
210 [% BLOCK jsinclude %]
212 allow_submit = false;
213 $('#place-article-request').on('submit', function( event ){
214 if ( ! allow_submit ) {
215 event.preventDefault();
217 [% IF article_request_type == 'item_only' %]
218 if ( ! $("input:radio[name='itemnumber']").is(":checked") ) {
219 alert( _("Please select a specific item for this article request.") );
224 var mandatory_fields = "[% mandatory_fields | html %]";
226 if ( mandatory_fields ) m = mandatory_fields.split(",");
229 for (i = 0; i < m.length; i++) {
230 if ( ! $("#" + m[i]).val() ) {
236 alert( _("The following fields are required and not filled in: ") + f.join(", ") );
241 $('#place-article-request').submit();