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>
39 <input type="text" required="required" name="title" id="title" size="50"/>
41 <label for="title">Title:</label>
42 <input type="text" name="title" id="title" size="50"/>
47 [% IF mandatory_fields.search('author') %]
48 <label for="author" class="required">Author:</label>
49 <input type="text" required="required" name="author" id="author" size="50"/>
51 <label for="author">Author:</label>
52 <input type="text" name="author" id="author" size="50"/>
57 [% IF mandatory_fields.search('volume') %]
58 <label for="volume" class="required">Volume:</label>
59 <input type="text" required="required" name="volume" id="volume" size="50"/>
61 <label for="volume">Volume:</label>
62 <input type="text" name="volume" id="volume" size="50"/>
67 [% IF mandatory_fields.search('issue') %]
68 <label for="issue" class="required">Issue:</label>
69 <input type="text" required="required" name="issue" id="issue" size="50"/>
71 <label for="issue">Issue:</label>
72 <input type="text" name="issue" id="issue" size="50"/>
77 [% IF mandatory_fields.search('date') %]
78 <label for="date" class="required">Date:</label>
79 <input type="text" required="required" name="date" id="date" size="50"/>
81 <label for="date">Date:</label>
82 <input type="text" name="date" id="date" size="50"/>
87 [% IF mandatory_fields.search('pages') %]
88 <label for="pages" class="required">Pages:</label>
89 <input type="text" required="required" name="pages" id="pages" size="50"/>
91 <label for="pages">Pages:</label>
92 <input type="text" name="pages" id="pages" size="50"/>
97 [% IF mandatory_fields.search('chapters') %]
98 <label for="chapters" class="required">Chapters:</label>
99 <input type="text" required="required" name="chapters" id="chapters" size="50"/>
101 <label for="chapters">Chapters:</label>
102 <input type="text" name="chapters" id="chapters" size="50"/>
107 <label for="patron_notes">Notes:</label>
108 <input type="text" name="patron_notes" id="patron_notes" size="50"/>
112 <label for="branchcode">Pickup library:</label>
113 <select name="branchcode" id="branchcode" required="required">
114 [% FOREACH b IN Branches.all %]
115 [% IF b.branchcode == Branches.GetLoggedInBranchcode %]
116 <option value="[% b.branchcode | html %]" selected="selected">[% b.branchname | html %]</option>
118 <option value="[% b.branchcode | html %]">[% b.branchname | html %]</option>
126 [% IF article_request_type != 'bib_only' %]
127 <table class="copiesrow table table-bordered table-striped">
128 <caption>Select a specific item:</caption>
134 <th>Home library</th>
141 [% FOREACH item IN biblio.items %]
142 [% IF item.can_article_request( patron ) %]
145 [% IF article_request_type == 'item_only' && !checked %]
146 [% SET checked = 1 %]
147 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" checked="checked" />
149 <input type="radio" name="itemnumber" value="[% item.itemnumber | html %]" />
153 [% ItemTypes.GetDescription( item.itype ) | html %]
156 [% item.barcode | html %]
159 [% Branches.GetName( item.homebranch ) | html %]
162 [% item.itemcallnumber | html %]
165 [% item.enumchron | html %]
171 [% IF article_request_type != 'item_only' %]
174 <input type="radio" name="itemnumber" value="" checked="checked"/>
185 <input type="submit" class="btn" value="Place request" />
188 <h1 class="title">[% biblio.title | html %]</h1>
189 <div class="alert alert-info">
190 No article requests can be made for this record.
194 </div> <!-- / .container -->
195 </div> <!-- / .main -->
197 [% INCLUDE 'opac-bottom.inc' %]
199 [% BLOCK jsinclude %]
201 allow_submit = false;
202 $('#place-article-request').on('submit', function( event ){
203 if ( ! allow_submit ) {
204 event.preventDefault();
206 [% IF article_request_type == 'item_only' %]
207 if ( ! $("input:radio[name='itemnumber']").is(":checked") ) {
208 alert( _("Please select a specific item for this article request.") );
213 var mandatory_fields = "[% mandatory_fields | html %]";
215 if ( mandatory_fields ) m = mandatory_fields.split(",");
218 for (i = 0; i < m.length; i++) {
219 if ( ! $("#" + m[i]).val() ) {
225 alert( _("The following fields are required and not filled in: ") + f.join(", ") );
230 $('#place-article-request').submit();