Bug 32085 - Consistent classes for primary buttons: Labels
Summary: Consistent classes for primary buttons: Labels
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 32067 32086
  Show dependency treegraph
 
Reported: 2022-11-03 11:24 UTC by Owen Leonard
Modified: 2023-12-28 20:43 UTC (History)
3 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:
22.11.00


Attachments
Bug 32085: Consistent classes for primary buttons: Labels (8.45 KB, patch)
2022-11-03 11:32 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 32085: Consistent classes for primary buttons: Labels (8.49 KB, patch)
2022-11-03 21:53 UTC, David Nind
Details | Diff | Splinter Review
Bug 32085: Consistent classes for primary buttons: Labels (8.55 KB, patch)
2022-11-04 18:27 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-11-03 11:24:26 UTC
As part of Bug 32067 - [OMNIBUS] Consistent classes for submit and/or primary buttons:

This patch will update buttons in label-creation templates so that buttons which are currently styled as primary buttons will have the the "btn btn-primary" classes.

In some places, the classes have been added to buttons which were not input[type='submit'] but which should be styled as primary.
Comment 1 Owen Leonard 2022-11-03 11:32:39 UTC
Created attachment 143081 [details] [review]
Bug 32085: Consistent classes for primary buttons: Labels

This patch makes changes the button markup in label-creation templates
-- including the barcode image generator -- so that all submit buttons
and any buttons that should should be styled as primary buttons have the
Bootstrap class "btn btn-primary."

To test, apply the patch and view label-related pages to confirm
that everything looks correct. In most cases there are no visible
changes.
Comment 2 David Nind 2022-11-03 21:53:58 UTC
Created attachment 143152 [details] [review]
Bug 32085: Consistent classes for primary buttons: Labels

This patch makes changes the button markup in label-creation templates
-- including the barcode image generator -- so that all submit buttons
and any buttons that should should be styled as primary buttons have the
Bootstrap class "btn btn-primary."

To test, apply the patch and view label-related pages to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-11-03 22:06:15 UTC
Testing notes (using koha-testing-docker)

1. These change the label templates accessed from Cataloging > Tools > 
   Label creator
   Barcode image generator
   Quick spine label creator

2. I struggled on the best way to test these changes. In the end, I:
   . Reviewed the patch - <input type="submit"... becomes <input type="submit" class="btn btn-primary"...
   . Listed the templates in koha-tmpl/intranet-tmpl/prog/en/modules/labels/files and split into two lists - those changed and those not changed
   . Worked out how to access them
   . Created screenshots and put them in a document (I haven't attached this, but am happy to)
   . Applied the patch (+ flush_memcached, restart_all, and cleared browser cache)
   . Went through list of files again: compared to original screenshot taken, then noted whether changed or not
   . Noted any questions - don't affect the sign off for this bug
   
3. Files changed:
- barcode-print.tt (No change. Barcode image generator) > 39999000011111 > Show barcode)
- label-bib-search.tt (note: couldn't figure out where this is used from - no results except .po files from "git grep label-bib-search.tt" (git grep label-bib-search.tt ":(exclude)*.po" shows no results))
- label-edit-layout.tt (No change. Label creator > New > Layout)
- label-edit-profile.tt (No change. Label creator > New > Printer profile)
- label-edit-range.tt (Changed - now orange colour. Label creator > New > Barcode range)
- label-edit-template.tt (No change. Label creator > New > Label template)
- label-print.tt (No changes. Called from 
    . labels/label-print.pl (Label creator > New > Label batch > [add some barcodes or item numbers] > Add items > select and use any of the export options) 
    . labels/spinelabel-print.pl (Quick spine label creator > [Enter a barcode for an item with a call number] > pop up window with noptions to "Print this label" and "Edit this label"))
- search.tt (No change. Label creator > New > Label batch > [leave Add by barocde(s) or itemnumbers field blank] > enter search criteria > Search) (called from label-item-search.pl)
- spinelabel-home.tt (No change. Quick spine label creator > 39999000011111 > View spine label)

4. Files not changed:
- label-edit-batch.tt (Label creator > New > Label batch)
- label-home.tt (Label creator)
- label-manage.tt (Any of the options for Label creator > Manage)
- result.tt (called from label-item-search.pl - see search.tt)
- spinelabel-print.tt (result window from spinelabel-home.tt (Quick spine label creator > 39999000011111 > View spine label)

5. File count check:
- Number of files in folder: 14
- Number of files listed: 14

Questions: 

1. Should the buttons be in the div or outisde the div? Those in the white background are:
  - Barcode image generator
  - Quick spine label creator

2. I couldn't figure out where label-bib-search.tt is used from - looks like it is not used anywhere.
Comment 4 Kyle M Hall 2022-11-04 18:27:06 UTC
Created attachment 143289 [details] [review]
Bug 32085: Consistent classes for primary buttons: Labels

This patch makes changes the button markup in label-creation templates
-- including the barcode image generator -- so that all submit buttons
and any buttons that should should be styled as primary buttons have the
Bootstrap class "btn btn-primary."

To test, apply the patch and view label-related pages to confirm
that everything looks correct. In most cases there are no visible
changes.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2022-11-04 22:25:55 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!