On bug 17847, av-build-dropbox.inc has been updated for the intranet,
not OPAC
There is only one call to av-build-dropbox.inc at the OPAC, from
opac-suggestion.tt
Test plan:
Create a new suggestion, anonymous or with a logged in user
=> Without this patch you got
Template process failed: undef error - The method default is not
covered by tests! at /home/vagrant/kohaclone/C4/Templates.pm line 121.
=> With this patch applied you should see the item type dropdown list
correctly filled
Reproduced without patch, OK with patch
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
size: the size to use for the input (generated if the authorised value category does not exist).
%]
-[% SET avs = AuthorisedValues.GetAuthValueDropbox( category, default ) %]
+[% SET avs = AuthorisedValues.GetAuthValueDropbox( category ) %]
[% DEFAULT
class = ''
size = 20
[% IF avs %]
<select id="[% name %]" name="[% name %]" class="[% class %]" >
[% FOR av IN avs %]
- [% IF av.default %]
- <option value="[% av.value %]" selected="selected">[% av.label | html_entity %]</option>
+ [% IF av.authorised_value == default %]
+ <option value="[% av.authorised_value %]" selected="selected">[% av.lib | html_entity %]</option>
[% ELSE %]
- <option value="[% av.value %]">[% av.label | html_entity %]</option>
+ <option value="[% av.authorised_value %]">[% av.lib | html_entity %]</option>
[% END %]
[% END %]
</select>