Lines 169-175
Link Here
|
169 |
[% ELSE %] |
169 |
[% ELSE %] |
170 |
<input type="checkbox" id="staff_searchable" name="staff_searchable" /> |
170 |
<input type="checkbox" id="staff_searchable" name="staff_searchable" /> |
171 |
[% END %] |
171 |
[% END %] |
172 |
<span class="hint">Check to make this attribute staff_searchable in the staff patron search.</span> |
172 |
<span class="hint"> |
|
|
173 |
Check to make this attribute searchable in staff patron searches. If |
174 |
checked, this attribute will appear in patron search dropdowns. |
175 |
</span> |
176 |
</li> |
177 |
<li><label for="searched_by_default">Search by default: </label> |
178 |
[% IF attribute_type AND attribute_type.searched_by_default %] |
179 |
<input type="checkbox" id="searched_by_default" name="searched_by_default" checked="checked" /> |
180 |
[% ELSE %] |
181 |
<input type="checkbox" id="searched_by_default" name="searched_by_default" /> |
182 |
[% END %] |
183 |
<span class="hint"> |
184 |
If checked, this field will be included in 'Standard' patron searches. Requires |
185 |
field to be marked as searchable above |
186 |
</span> |
173 |
</li> |
187 |
</li> |
174 |
<li><label for="mandatory">Mandatory: </label> |
188 |
<li><label for="mandatory">Mandatory: </label> |
175 |
[% IF attribute_type AND attribute_type.mandatory %] |
189 |
[% IF attribute_type AND attribute_type.mandatory %] |
Lines 301-306
Link Here
|
301 |
<th>Library limitation</th> |
315 |
<th>Library limitation</th> |
302 |
<th>Authorized value category</th> |
316 |
<th>Authorized value category</th> |
303 |
<th>Mandatory</th> |
317 |
<th>Mandatory</th> |
|
|
318 |
<th>Searching</th> |
304 |
<th class="NoSort noExport">Actions</th> |
319 |
<th class="NoSort noExport">Actions</th> |
305 |
</tr> |
320 |
</tr> |
306 |
</thead> |
321 |
</thead> |
Lines 340-345
Link Here
|
340 |
<span>No</span> |
355 |
<span>No</span> |
341 |
[% END %] |
356 |
[% END %] |
342 |
</td> |
357 |
</td> |
|
|
358 |
<td> |
359 |
[% IF ( item.staff_searchable ) %] |
360 |
[% IF( item.searched_by_default ) %] |
361 |
<span>Searched by default</span> |
362 |
[% ELSE %] |
363 |
<span>Searchable</span> |
364 |
[% END %] |
365 |
[% ELSE %] |
366 |
<span>Not searchable</span> |
367 |
[% END %] |
368 |
</td> |
343 |
<td class="actions"> |
369 |
<td class="actions"> |
344 |
<a class="btn btn-default btn-xs" href="[% script_name | url %]?op=edit_attribute_type&code=[% item.code | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
370 |
<a class="btn btn-default btn-xs" href="[% script_name | url %]?op=edit_attribute_type&code=[% item.code | uri %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> |
345 |
<a class="btn btn-default btn-xs" href="[% script_name | url %]?op=delete_attribute_type&code=[% item.code | uri %]"><i class="fa fa-trash-can"></i> Delete</a> |
371 |
<a class="btn btn-default btn-xs" href="[% script_name | url %]?op=delete_attribute_type&code=[% item.code | uri %]"><i class="fa fa-trash-can"></i> Delete</a> |
Lines 374-379
Link Here
|
374 |
[% INCLUDE 'columns_settings.inc' %] |
400 |
[% INCLUDE 'columns_settings.inc' %] |
375 |
<script> |
401 |
<script> |
376 |
$(document).ready(function() { |
402 |
$(document).ready(function() { |
|
|
403 |
|
404 |
function toggle_search_default(){ |
405 |
if( $("#staff_searchable").is(":checked") ){ |
406 |
$("#searched_by_default").prop('disabled', false); |
407 |
} else { |
408 |
|
409 |
$("#searched_by_default").prop('disabled', true).prop('checked',false); |
410 |
} |
411 |
} |
412 |
$("#staff_searchable").on('change',function(){ |
413 |
toggle_search_default(); |
414 |
}); |
415 |
|
416 |
toggle_search_default(); |
417 |
|
418 |
|
377 |
if ( $("#branches option:selected").length < 1 ) { |
419 |
if ( $("#branches option:selected").length < 1 ) { |
378 |
$("#branches option:first").attr("selected", "selected"); |
420 |
$("#branches option:first").attr("selected", "selected"); |
379 |
} |
421 |
} |