Bug 24279: (QA follow-up) Show values disabled with tooltips
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
b38546f1d1
commit
2a57e3d3db
|
|
@ -171,11 +171,10 @@ sub generate_subfield_form {
|
|||
my %authorised_lib;
|
||||
# builds list, depending on authorised value...
|
||||
if ( $subfieldlib->{authorised_value} eq "LOST" ) {
|
||||
my $ClaimReturnedLostValue = C4::Context->preference('ClaimReturnedLostValue');
|
||||
$subfield_data{IS_LOST_AV} = 1;
|
||||
push @authorised_values, qq{};
|
||||
my $av = GetAuthorisedValues( $subfieldlib->{authorised_value} );
|
||||
for my $r ( @$av ) {
|
||||
next if $ClaimReturnedLostValue && $r->{authorised_value} eq $ClaimReturnedLostValue;
|
||||
push @authorised_values, $r->{authorised_value};
|
||||
$authorised_lib{$r->{authorised_value}} = $r->{lib};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
[% IF ( ITEM_DAT.withdrawn ) %]Withdrawn[% END %]
|
||||
)[% END %]</h4>
|
||||
|
||||
<div class="rows">
|
||||
<span class="rows">
|
||||
<ol class="bibliodetails">
|
||||
<li><span class="label">Current location:</span> [% Branches.GetName( ITEM_DAT.holdingbranch ) | html %] </li>
|
||||
<li><span class="label">Checkout status:</span>
|
||||
|
|
@ -104,11 +104,13 @@
|
|||
<input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber | html %]" />
|
||||
<input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber | html %]" />
|
||||
<input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber | html %]" />
|
||||
<select name="itemlost" >
|
||||
<select name="itemlost">
|
||||
<option value="">Choose</option>
|
||||
[% FOREACH itemlostloo IN itemlostloop %]
|
||||
[% NEXT IF ClaimReturnedLostValue && !ITEM_DAT.itemlost && itemlostloo.authorised_value == ClaimReturnedLostValue #Filter claims returned status from pulldown %]
|
||||
[% IF itemlostloo.authorised_value == ITEM_DAT.itemlost %]
|
||||
[% IF ClaimReturnedLostValue && !ITEM_DAT.itemlost && itemlostloo.authorised_value == ClaimReturnedLostValue #Filter claims returned status from pulldown %]
|
||||
[% SET add_claims_returned_tip = itemlostloo.lib %]
|
||||
<option value="[% itemlostloo.authorised_value | html %]" disabled="disabled">[% itemlostloo.lib | html %]</option>
|
||||
[% ELSIF itemlostloo.authorised_value == ITEM_DAT.itemlost %]
|
||||
<option value="[% itemlostloo.authorised_value | html %]" selected="selected">[% itemlostloo.lib | html %]</option>
|
||||
[% ELSE %]
|
||||
<option value="[% itemlostloo.authorised_value | html %]">[% itemlostloo.lib | html %]</option>
|
||||
|
|
@ -118,12 +120,18 @@
|
|||
<input type="hidden" name="withdrawn" value="[% ITEM_DAT.withdrawn | html %]" />
|
||||
<input type="hidden" name="damaged" value="[% ITEM_DAT.damaged | html %]" />
|
||||
|
||||
[% IF add_claims_returned_tip %]
|
||||
<i class="fa fa-question-circle" data-toggle="tooltip"
|
||||
title="The value '[% add_claims_returned_tip | html %]' cannot be selected. Return claims must be processed from the patron details page."
|
||||
data-placement="right"></i>
|
||||
[% END %]
|
||||
|
||||
[% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %]
|
||||
<input type="submit" name="submit" class="submit" value="Set status" disabled="disabled"/>
|
||||
<p class="help-block">Item has been claimed as returned.</p>
|
||||
[% ELSE %]
|
||||
<input type="hidden" name="op" value="set_lost" />
|
||||
<input type="submit" name="submit" class="submit" value="Set status" /></form>
|
||||
<input type="submit" name="submit" class="submit" value="Set status" />
|
||||
[% END %]
|
||||
</form>
|
||||
[% ELSE %]
|
||||
|
|
@ -304,6 +312,9 @@
|
|||
<script>
|
||||
var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10));
|
||||
browser.show();
|
||||
$( document ).ready(function() {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
[% INCLUDE 'intranet-bottom.inc' %]
|
||||
|
|
|
|||
|
|
@ -166,10 +166,22 @@
|
|||
[% IF aval == mv.default %]
|
||||
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option>
|
||||
[% ELSE %]
|
||||
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
|
||||
[% IF ite.IS_LOST_AV && aval == Koha.Preference("ClaimReturnedLostValue") %]
|
||||
[% SET add_claims_returned_tip = mv.labels.$aval %]
|
||||
<option disabled="disabled" value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
|
||||
[% ELSE %]
|
||||
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
</select>
|
||||
|
||||
[% IF ite.IS_LOST_AV && add_claims_returned_tip %]
|
||||
|
||||
<i class="fa fa-question-circle" data-toggle="tooltip"
|
||||
title="The value '[% add_claims_returned_tip | html %]' cannot be selected. Return claims must be processed from the patron details page."
|
||||
data-placement="right"></i>
|
||||
[% END %]
|
||||
[% ELSIF ( mv.type == 'text_auth' ) %]
|
||||
[% IF mv.readonly %]
|
||||
<input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" readonly="readonly" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue