|
Lines 154-166
Link Here
|
| 154 |
<input type="text" name="patron_notes" id="patron_notes" size="50" /> |
154 |
<input type="text" name="patron_notes" id="patron_notes" size="50" /> |
| 155 |
</li> |
155 |
</li> |
| 156 |
|
156 |
|
|
|
157 |
[% SET ArticleRequestsSupportedFormats = Koha.MultivaluePreference('ArticleRequestsSupportedFormats') %] |
| 158 |
[% IF ArticleRequestsSupportedFormats.size %] |
| 157 |
<li> |
159 |
<li> |
| 158 |
<label for="format">Format:</label> |
160 |
<label for="format">Format:</label> |
| 159 |
<select name="format" id="format"> |
161 |
<select name="format" id="format"> |
| 160 |
<option value="PHOTOCOPY">Photocopy</option> |
162 |
[% FOR format IN ArticleRequestsSupportedFormats %] |
| 161 |
<option value="SCAN">Digital scan</option> |
163 |
[% IF format == 'PHOTOCOPY' %] |
|
|
164 |
<option value="PHOTOCOPY">Photocopy</option> |
| 165 |
[% ELSIF format == 'SCAN' %] |
| 166 |
<option value="SCAN">Digital scan</option> |
| 167 |
[% END %] |
| 168 |
[% END %] |
| 162 |
</select> |
169 |
</select> |
| 163 |
</li> |
170 |
</li> |
|
|
171 |
[% END %] |
| 164 |
|
172 |
|
| 165 |
[% IF AllPublicBranches.size > 1 %] |
173 |
[% IF AllPublicBranches.size > 1 %] |
| 166 |
<li> |
174 |
<li> |
|
Lines 317-334
Link Here
|
| 317 |
} |
325 |
} |
| 318 |
}); |
326 |
}); |
| 319 |
|
327 |
|
| 320 |
// Initialize format(s) |
|
|
| 321 |
var supported_formats = "[% Koha.Preference('ArticleRequestsSupportedFormats') | html %]"; |
| 322 |
if( !supported_formats.match(/PHOTOCOPY/) ) |
| 323 |
$('#format option[value="PHOTOCOPY"]').remove(); |
| 324 |
if( !supported_formats.match(/SCAN/) ) |
| 325 |
$('#format option[value="SCAN"]').remove(); |
| 326 |
|
| 327 |
if( $('#format option').length > 1 ) { |
| 328 |
// Select first listed format |
| 329 |
var first_format = supported_formats.split('|')[0].replace(/^\s*|\s*$/g, ''); |
| 330 |
$('#format option[value="'+first_format+'"]').attr('selected', true); |
| 331 |
} |
| 332 |
}); |
328 |
}); |
| 333 |
</script> |
329 |
</script> |
| 334 |
[% END %] |
330 |
[% END %] |