Bug 20205 - Add IDs to buttons in patron-toolbar.inc
Summary: Add IDs to buttons in patron-toolbar.inc
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Magnus Enger
QA Contact: Katrin Fischer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-15 09:08 UTC by Magnus Enger
Modified: 2018-06-04 20:15 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20205 - Add IDs to buttons in patron-toolbar.inc (2.77 KB, patch)
2018-02-15 09:19 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 20205 - Add IDs to buttons in patron-toolbar.inc (2.82 KB, patch)
2018-02-15 14:09 UTC, Owen Leonard
Details | Diff | Splinter Review
k (2.89 KB, patch)
2018-02-16 06:28 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20205: Add IDs to buttons in patron-toolbar.inc (2.88 KB, patch)
2018-02-16 06:29 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 Magnus Enger 2018-02-15 09:08:37 UTC
Bug 3534 added the "Quick add new patron" button to patron-toolbar.inc. The button is displayed if either PatronQuickAddFields or BorrowerMandatoryField (or both) is set. This means there is no way to turn off the button if you still want to have mandatory fields. 

An alternative way to remove the button is to hide it with CSS, but the buttons in patron-toolbar.inc do not have unique IDs, so this harder than it needs to be. 

This bug will add ID elements to the buttons in patron-toolbar.inc.
Comment 1 Magnus Enger 2018-02-15 09:19:30 UTC
Created attachment 71641 [details] [review]
Bug 20205 - Add IDs to buttons in patron-toolbar.inc

The buttons in patron-toolbar.inc lack unique IDs, making them
hard to style/remove with CSS. This patch adds IDs to all three
buttons.

To test:
- Look in koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc
  and verify there are no IDs
- Apply the patch and look at the file again to verify the IDs have
  been added
- Test the "New patron" and "Quick add new patron" buttons to verify
  they still work as intended
- Check that the new buttons are globally unique:
  $ grep -rn "new-patron-button" *
  $ grep -rn "patron-lists-button" *
Comment 2 Owen Leonard 2018-02-15 14:09:59 UTC
Created attachment 71658 [details] [review]
Bug 20205 - Add IDs to buttons in patron-toolbar.inc

The buttons in patron-toolbar.inc lack unique IDs, making them
hard to style/remove with CSS. This patch adds IDs to all three
buttons.

To test:
- Look in koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc
  and verify there are no IDs
- Apply the patch and look at the file again to verify the IDs have
  been added
- Test the "New patron" and "Quick add new patron" buttons to verify
  they still work as intended
- Check that the new buttons are globally unique:
  $ grep -rn "new-patron-button" *
  $ grep -rn "patron-lists-button" *

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2018-02-16 06:28:44 UTC
Created attachment 71696 [details] [review]
k
Comment 4 Katrin Fischer 2018-02-16 06:29:22 UTC
Created attachment 71697 [details] [review]
Bug 20205: Add IDs to buttons in patron-toolbar.inc

The buttons in patron-toolbar.inc lack unique IDs, making them
hard to style/remove with CSS. This patch adds IDs to all three
buttons.

To test:
- Look in koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc
  and verify there are no IDs
- Apply the patch and look at the file again to verify the IDs have
  been added
- Test the "New patron" and "Quick add new patron" buttons to verify
  they still work as intended
- Check that the new buttons are globally unique:
  $ grep -rn "new-patron-button" *
  $ grep -rn "patron-lists-button" *

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2018-02-16 17:07:18 UTC
Pushed to master for 18.05, thanks to everybody involved!