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 <ul class="breadcrumb">
15 <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
16 <li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblio.biblionumber | uri %]">Details for: [% biblio.title | html %]</a> <span class="divider">›</span></li>
17 <li><a href="#">Request article</a></li>
20 <div class="container">
21 [% IF biblio.can_article_request( patron ) %]
22 [% SET article_request_type = biblio.article_request_type( patron ) %]
24 [% IF article_request_type == 'yes' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFields') %] [% END %]
25 [% IF article_request_type == 'bib_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsRecordOnly') %] [% END %]
26 [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %] [% END %]
28 <h3>Place article request for [% biblio.title | html %]</h3>
30 <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
31 <input type="hidden" name="action" value="create" />
32 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber | html %]" />
34 <fieldset class="rows">
37 [% IF mandatory_fields.search('title') %]
38 <label for="title" class="required">Title:</label>
40 <label for="title">Title:</label>
42 <input type="text" name="title" id="title" size="50"/>
46 [% IF mandatory_fields.search('author') %]
47 <label for="author" class="required">Author:</label>
49 <label for="author">Author:</label>
51 <input type="text" name="author" id="author" size="50"/>
55 [% IF mandatory_fields.search('volume') %]
56 <label for="volume" class="required">Volume:</label>
58 <label for="volume">Volume:</label>
60 <input type="text" name="volume" id="volume" size="50"/>
64 [% IF mandatory_fields.search('issue') %]
65 <label for="issue" class="required">Issue:</label>
67 <label for="issue">Issue:</label>
69 <input type="text" name="issue" id="issue" size="50"/>
73 [% IF mandatory_fields.search('date') %]
74 <label for="date" class="required">Date:</label>
76 <label for="date">Date:</label>
78 <input type="text" name="date" id="date" size="50"/>
82 [% IF mandatory_fields.search('pages') %]
83 <label for="pages" class="required">Pages:</label>
85 <label for="pages">Pages:</label>
87 <input type="text" name="pages" id="pages" size="50"/>
91 [% IF mandatory_fields.search('chapters') %]
92 <label for="chapters" class="required">Chapters:</label>
94 <label for="chapters">Chapters:</label>
96 <input type="text" name="chapters" id="chapters" size="50"/>
100 <label for="patron_notes">Notes:</label>
101 <input type="text" name="patron_notes" id="patron_notes" size="50"/>
105 <label for="branchcode">Pickup library:</label>
106 <select name="branchcode" id="branchcode">
107 [% FOREACH b IN Branches.all %]
108 [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
109 <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
111 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
119 [% IF article_request_type != 'bib_only' %]
120 <table class="copiesrow table table-bordered table-striped">
121 <caption>Select a specific item:</caption>
127 <th>Home library</th>
134 [% FOREACH item IN biblio.items %]
135 [% IF item.can_article_request( patron ) %]
138 [% IF article_request_type == 'item_only' && !checked %]
139 [% SET checked = 1 %]
140 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" checked="checked" />
142 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" />
146 [% ItemTypes.GetDescription( item.itype ) | html %]
149 [% item.barcode | html %]
152 [% Branches.GetName( item.homebranch ) | html %]
155 [% item.itemcallnumber | html %]
158 [% item.enumchron | html %]
164 [% IF article_request_type != 'item_only' %]
167 <input type="radio" name="itemnumber" value="" checked="checked"/>
178 <input type="submit" class="btn" value="Place request" />
181 <h1 class="title">[% biblio.title | html %]</h1>
182 <div class="alert alert-info">
183 No article requests can be made for this record.
187 </div> <!-- / .container -->
188 </div> <!-- / .main -->
190 [% INCLUDE 'opac-bottom.inc' %]
192 [% BLOCK jsinclude %]
194 allow_submit = false;
195 $('#place-article-request').on('submit', function( event ){
196 if ( ! allow_submit ) {
197 event.preventDefault();
199 [% IF article_request_type == 'item_only' %]
200 if ( ! $("input:radio[name='itemnumber']").is(":checked") ) {
201 alert( _("Please select a specific item for this article request.") );
206 var mandatory_fields = "[% mandatory_fields | html %]";
208 if ( mandatory_fields ) m = mandatory_fields.split(",");
211 for (i = 0; i < m.length; i++) {
212 if ( ! $("#" + m[i]).val() ) {
218 alert( _("The following fields are required and not filled in: ") + f.join(", ") );
223 $('#place-article-request').submit();