Bug 23957: Remove button style with famfamfam icon background and replace with Font Awesome

The patch modifies the markup and CSS related to the holds template in
the staff client when holds policy override is necessary. The CSS
background image is replaced with a Font Awesome icon. <input>s are
replaced with <button>s to allow for the icon markup.

To test, apply the patch and regenerate the staff client CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

 - Enable the AllowHoldPolicyOverride system preference.
 - Start the process of placing a hold for a patron on a title which
   would not normally be available for hold. For instance: The patron
   already has too many holds.
 - On the hold confirmation screen the "Place hold" buttons should
   appear with a little yellow "warning" icon.
 - Clicking either of the two "Place hold" buttons should trigger a
   confirmation dialog. Test both the "Confirm" and "Cancel" options.

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2019-11-03 23:45:44 +00:00 committed by Martin Renvoize
parent 6051f8686b
commit 40bae6db38
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 17 additions and 13 deletions

View file

@ -406,11 +406,6 @@ input {
@include disabled-button;
}
}
&.warning {
background: #FFF url("../img/famfamfam/silk/error.png") no-repeat 4px center;
padding: .25em .25em .25em 25px;
}
}
.input-warning {
@ -1787,6 +1782,15 @@ i {
}
}
.warning {
i {
&.fa-exclamation-triangle {
color: #FFD700;
text-shadow: 0 -1px 0 rgba( 0, 0, 0, .3);
}
}
}
.accesskey {
text-decoration: underline;
}

View file

@ -492,11 +492,11 @@
<fieldset class="action">
[% IF ( patron.borrowernumber ) %]
[% IF ( override_required ) %]
<input type="submit" class="warning" value="Place hold" />
<button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
[% ELSIF ( none_available ) %]
<input type="submit" disabled="disabled" value="Place hold" />
<button type="submit" disabled="disabled" class="btn btn-default btn-disabled">Place hold</button>
[% ELSE %]
<input type="submit" value="Place hold" />
<button type="submit" class="btn btn-default">Place hold</button>
[% END %]
[% END %]
</fieldset>
@ -781,14 +781,14 @@
<fieldset class="action">
[% IF ( patron AND patron.borrowernumber ) %]
[% IF ( override_required ) %]
<input type="submit" class="warning" value="Place hold" />
<button type="submit" class="btn btn-default warning"><i class="fa fa-exclamation-triangle "></i> Place hold</button>
[% ELSIF ( none_available ) %]
<input type="submit" disabled="disabled" value="Place hold" />
<button type="submit" class="btn btn-default btn-disabled">Place hold</button>
[% ELSE %]
[% IF ( multi_hold ) %]
<input type="submit" value="Place hold" id="multi_hold_submit"/>
<button type="submit" class="btn btn-default" id="multi_hold_submit">Place hold</button>
[% ELSE %]
<input type="submit" value="Place hold" />
<button type="submit" class="btn btn-default">Place hold</button>
[% END %]
[% END %]
[% END # /IF patron %]
@ -1172,7 +1172,7 @@
return confirm(msg);
});
$("input.warning").click(function() {
$("button.warning").click(function() {
return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
});
$("#requestany").click(function() {