<select name="[% kohafield | html %]" id="[%- mv.id | html -%]" class="input_marceditor select2 [% kohafield | html %]" data-category="[% mv.category | html %]" data-width="50%">
[% END %]
+ [% SET matched = 0 %]
[% FOREACH aval IN mv.values %]
[% IF aval == mv.default %]
+ [% SET matched = 1 %]
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
[% ELSE %]
[% IF subfield.IS_LOST_AV && Koha.Preference("ClaimReturnedLostValue") && aval == Koha.Preference("ClaimReturnedLostValue") %]
[% END %]
[% END %]
[% END %]
- </select>
+ [% UNLESS matched || ( ( kohafield == 'items.damaged' || kohafield == 'items.itemlost' || kohafield == 'items.withdrawn' || kohafield == 'items.notforloan' ) && mv.default == '0' ) %]
+ [%# If the current value is not in the authorised list and is not a field where 0 means unset #%]
+ <option value="[%- mv.default | html -%]" selected="selected">[%- mv.default | html -%] (Not an authorised value)</option>
+ </select>
+ <span style="float:right;" title="The current value [% mv.default | html %] is not configured for the authorised value category controlling this subfield"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i></span>
+ [% ELSE %]
+ </select>
+ [% END %]
[% ELSIF ( mv.type == 'text_auth' ) %]
[% IF mv.readonly %]
<input type="text" id="[%- mv.id | html -%]" name="[% kohafield | html %]" class="input_marceditor [% kohafield | html %]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
<td>[% item.index + 1 | html %]</td>
[% IF checkboxes_edit %]
[% UNLESS can_be_edited%]
- <td class="error">Cannot edit</td>
+ <td class="error">
+ <i class="fa fa-times fa-lg" title="Cannot edit"></i>
+ </td>
[% ELSE %]
<td>
<input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" data-is-onloan="[% item.is_checked_out | html %]" />
[% END %]
[% ELSIF checkboxes_delete %]
[% UNLESS can_be_edited %]
- <td class="error">Cannot delete</td>
+ <td class="error">
+ <i class="fa fa-times fa-lg" title="Cannot delete"></i>
+ </td>
[% ELSE %]
[% IF item.safe_to_delete %]
<td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" checked="checked" /></td>
[% END %]
[% END %]
- <td><input type="checkbox" name="itemnumber" value="[% item.itemnumber | html %]" id="row[% item.itemnumber | html %]" disabled="disabled" title="[% cannot_delete_reason | html %]"/></td>
+ <td class="error">
+ <i class="fa fa-times fa-lg" title="[% cannot_delete_reason | html %]"></i>
+ </td>
[% END %]
[% END %]
[% END %]
[%# BOOTSTRAP TAB WRAPPER USAGE
- [ WRAPPER tabs id= "tabs container id" ]
+ [ WRAPPER tabs id= "tabs_container_id" ]
[ WRAPPER tabs_nav ]
- [ WRAPPER tab_item tabname= "tab name 1" bt_active= 1 ] [ content ] [ END ]
- [ WRAPPER tab_item tabname= "tab name 2" ] [ content ] [ END ]
+ [ WRAPPER tab_item tabname= "tab_name_1" bt_active= 1 ] Tab text 1 [ END ]
+ [ WRAPPER tab_item tabname= "tab_name_2" ] Tab text 2 [ END ]
...
[ END ]
[ WRAPPER tab_panels ]
- [ WRAPPER tab_panel id="tab name 1" bt_active= 1 ] [ content ] [ END ]
- [ WRAPPER tab_panel id="tab name 2"] [ content ] [ END ]
+ [ WRAPPER tab_panel tabname="tab_name_1" bt_active= 1 ] Panel contents 1 [ END ]
+ [ WRAPPER tab_panel tabname="tab_name_2" ] Panel contents 2 [ END ]
...
[ END ]
[ END ]
<a href="#[% tabname | uri %]_panel" aria-controls="[% tabname | uri %]_panel" role="tab" data-toggle="tab">
[% content | $raw %]
</a>
- <li>
+ </li>
[% END %]
[% BLOCK tab_panels %]