Bug 23957 - Remove button style with famfamfam icon background and replace with Font Awesome
Summary: Remove button style with famfamfam icon background and replace with Font Awesome
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-03 23:42 UTC by Owen Leonard
Modified: 2021-06-14 21:29 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02


Attachments
Bug 23957: Remove button style with famfamfam icon background and replace with Font Awesome (5.32 KB, patch)
2019-11-03 23:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23957: Remove button style with famfamfam icon background and replace with Font Awesome (5.35 KB, patch)
2019-11-04 17:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23957: Remove button style with famfamfam icon background and replace with Font Awesome (5.39 KB, patch)
2019-11-08 21:49 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 23957: (follow-up) Disable both place hold buttons (1.54 KB, patch)
2019-12-10 13:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23957: Remove button style with famfamfam icon background and replace with Font Awesome (5.40 KB, patch)
2019-12-22 17:31 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23957: (follow-up) Disable both place hold buttons (1.54 KB, patch)
2019-12-22 17:31 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-11-03 23:42:29 UTC
When hold policy override is enabled and the librarian tries to place a hold on an title which would otherwise not be available to be placed on hold, the input button is shown with a "warning" icon. Elsewhere in this template this image icon was replaced with a Font Awesome icon (in Bug 14695). This should be done for the inputs as well.
Comment 1 Owen Leonard 2019-11-03 23:51:49 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2019-11-04 10:25:15 UTC
(In reply to Owen Leonard from comment #0)
> This should be done for the inputs as well.

Why not on the same patch?


$ yarn build


Message:
    koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
Error: Invalid CSS after "...hadow: 0 -1px 0": expected expression (e.g. 1px, bold), was "#00000059;"
        on line 1794 of koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
>>             text-shadow: 0 -1px 0 #00000059;
   ----------------------------------^

The hex code color is not valid.
Comment 3 Owen Leonard 2019-11-04 17:29:57 UTC
Created attachment 95027 [details] [review]
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.
Comment 4 Owen Leonard 2019-11-04 17:31:12 UTC
(In reply to Jonathan Druart from comment #2)
> (In reply to Owen Leonard from comment #0)
> > This should be done for the inputs as well.
> 
> Why not on the same patch?

My comment refers to the changes made in the patch.
Comment 5 Maryse Simard 2019-11-08 21:49:35 UTC
Created attachment 95244 [details] [review]
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>
Comment 6 Katrin Fischer 2019-11-22 21:25:39 UTC
Hi Owen, I have some difficulties with this bug. The second "Place hold" button on the end of the page does no longer 'lock' when it should.

Example:
- override is not active
- try to place a hold on a record with only 'not for loan' itemtypes
- the first 'place hold' button is locked, but the second after the 
  item table is not.
Comment 7 Owen Leonard 2019-12-10 13:40:14 UTC
Created attachment 96156 [details] [review]
Bug 23957: (follow-up) Disable both place hold buttons

This follow-up adds the correct markup to the second of two "Place hold"
buttons so that it is disabled when the first is disabled.
Comment 8 Katrin Fischer 2019-12-22 17:31:17 UTC
Created attachment 96578 [details] [review]
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>
Comment 9 Katrin Fischer 2019-12-22 17:31:21 UTC
Created attachment 96579 [details] [review]
Bug 23957: (follow-up) Disable both place hold buttons

This follow-up adds the correct markup to the second of two "Place hold"
buttons so that it is disabled when the first is disabled.
Comment 10 Martin Renvoize 2020-01-03 15:48:44 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Joy Nelson 2020-01-14 00:26:03 UTC
Pushed to 19.11.x branch for 19.11.02
Comment 12 Lucas Gass 2020-01-15 21:43:56 UTC
there is many merge conflicts when applying this to 19.05.x, I am going to skip backporting it.