Lines 155-167
Link Here
|
155 |
<input type="text" name="patron_notes" id="patron_notes" size="50"/> |
155 |
<input type="text" name="patron_notes" id="patron_notes" size="50"/> |
156 |
</li> |
156 |
</li> |
157 |
|
157 |
|
|
|
158 |
[% SET ArticleRequestsSupportedFormats = Koha.MultivaluePreference('ArticleRequestsSupportedFormats') %] |
159 |
[% IF ArticleRequestsSupportedFormats.size %] |
158 |
<li> |
160 |
<li> |
159 |
<label for="format">Format:</label> |
161 |
<label for="format">Format:</label> |
160 |
<select name="format" id="format"> |
162 |
<select name="format" id="format"> |
161 |
<option value="PHOTOCOPY">Photocopy</option> |
163 |
[% FOR format IN ArticleRequestsSupportedFormats %] |
162 |
<option value="SCAN">Digital scan</option> |
164 |
[% IF format == 'PHOTOCOPY' %] |
|
|
165 |
<option value="PHOTOCOPY">Photocopy</option> |
166 |
[% ELSIF format == 'SCAN' %] |
167 |
<option value="SCAN">Digital scan</option> |
168 |
[% END %] |
169 |
[% END %] |
163 |
</select> |
170 |
</select> |
164 |
</li> |
171 |
</li> |
|
|
172 |
[% END %] |
165 |
|
173 |
|
166 |
<li> |
174 |
<li> |
167 |
<label for="branchcode">Pickup library:</label> |
175 |
<label for="branchcode">Pickup library:</label> |
Lines 295-312
$(document).ready( function() {
Link Here
|
295 |
} |
303 |
} |
296 |
}); |
304 |
}); |
297 |
|
305 |
|
298 |
// Initialize format(s) |
|
|
299 |
var supported_formats = "[% Koha.Preference('ArticleRequestsSupportedFormats') | html %]"; |
300 |
if( !supported_formats.match(/PHOTOCOPY/) ) |
301 |
$('#format option[value="PHOTOCOPY"]').remove(); |
302 |
if( !supported_formats.match(/SCAN/) ) |
303 |
$('#format option[value="SCAN"]').remove(); |
304 |
|
305 |
if( $('#format option').length > 1 ) { |
306 |
// Select first listed format |
307 |
var first_format = supported_formats.split('|')[0].replace(/^\s*|\s*$/g, ''); |
308 |
$('#format option[value="'+first_format+'"]').attr('selected', true); |
309 |
} |
310 |
}); |
306 |
}); |
311 |
</script> |
307 |
</script> |
312 |
[% END %] |
308 |
[% END %] |