4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% 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="#">Request article</a></li>
19 <div class="container">
20 [% IF biblio.can_article_request( patron ) %]
21 [% SET article_request_type = biblio.article_request_type( patron ) %]
23 [% IF article_request_type == 'yes' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFields') %] [% END %]
24 [% IF article_request_type == 'bib_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsRecordOnly') %] [% END %]
25 [% IF article_request_type == 'item_only' %] [% SET mandatory_fields = Koha.Preference('ArticleRequestsMandatoryFieldsItemOnly') %] [% END %]
27 <h3>Place article request for [% biblio.title %]</h3>
29 <form id="place-article-request" method="post" action="/cgi-bin/koha/opac-request-article.pl">
30 <input type="hidden" name="action" value="create" />
31 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblio.biblionumber %]" />
33 <fieldset class="rows">
36 [% IF mandatory_fields.search('title') %]
37 <label for="title" class="required">Title:</label>
39 <label for="title">Title:</label>
41 <input type="text" name="title" id="title" size="50"/>
45 [% IF mandatory_fields.search('author') %]
46 <label for="author" class="required">Author:</label>
48 <label for="author">Author:</label>
50 <input type="text" name="author" id="author" size="50"/>
54 [% IF mandatory_fields.search('volume') %]
55 <label for="volume" class="required">Volume:</label>
57 <label for="volume">Volume:</label>
59 <input type="text" name="volume" id="volume" size="50"/>
63 [% IF mandatory_fields.search('issue') %]
64 <label for="issue" class="required">Issue:</label>
66 <label for="issue">Issue:</label>
68 <input type="text" name="issue" id="issue" size="50"/>
72 [% IF mandatory_fields.search('date') %]
73 <label for="date" class="required">Date:</label>
75 <label for="date">Date:</label>
77 <input type="text" name="date" id="date" size="50"/>
81 [% IF mandatory_fields.search('pages') %]
82 <label for="pages" class="required">Pages:</label>
84 <label for="pages">Pages:</label>
86 <input type="text" name="pages" id="pages" size="50"/>
90 [% IF mandatory_fields.search('chapters') %]
91 <label for="chapters" class="required">Chapters:</label>
93 <label for="chapters">Chapters:</label>
95 <input type="text" name="chapters" id="chapters" size="50"/>
99 <label for="patron_notes">Notes:</label>
100 <input type="text" name="patron_notes" id="patron_notes" size="50"/>
104 <label for="branchcode">Pickup library:</label>
105 <select name="branchcode" id="branchcode">
106 [% FOREACH b IN Branches.all %]
107 [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
108 <option value="[% b.branchcode %]" selected="selected">[% b.branchname %]</option>
110 <option value="[% b.branchcode %]">[% b.branchname %]</option>
118 [% IF article_request_type != 'bib_only' %]
119 <table class="copiesrow table table-bordered table-striped">
120 <caption>Select a specific item:</caption>
126 <th>Home library</th>
133 [% FOREACH item IN biblio.items %]
134 [% IF item.can_article_request( patron ) %]
137 [% IF article_request_type == 'item_only' && !checked %]
138 [% SET checked = 1 %]
139 <input type="radio" name="itemnumber" value="[% item.itemnumber %]" checked="checked" />
141 <input type="radio" name="itemnumber" value="[% item.itemnumber %]" />
145 [% ItemTypes.GetDescription( item.itype ) %]
151 [% Branches.GetName( item.homebranch ) %]
154 [% item.itemcallnumber %]
163 [% IF article_request_type != 'item_only' %]
166 <input type="radio" name="itemnumber" value="" checked="checked"/>
177 <input type="submit" class="btn" value="Place request" />
180 No article requests can be made for this record.
183 </div> <!-- / .container -->
184 </div> <!-- / .main -->
186 [% INCLUDE 'opac-bottom.inc' %]
188 [% BLOCK jsinclude %]
189 <script type="text/javascript">
191 allow_submit = false;
192 $('#place-article-request').on('submit', function( event ){
193 if ( ! allow_submit ) {
194 event.preventDefault();
196 [% IF article_request_type == 'item_only' %]
197 if ( ! $("input:radio[name='itemnumber']").is(":checked") ) {
198 alert( _("Please select a specific item for this article request.") );
203 var mandatory_fields = "[% mandatory_fields %]";
205 if ( mandatory_fields ) m = mandatory_fields.split(",");
208 for (i = 0; i < m.length; i++) {
209 if ( ! $("#" + m[i]).val() ) {
215 alert( _("The following fields are required and not filled in: ") + f.join(", ") );
220 $('#place-article-request').submit();