Bug 20205

Summary: Add IDs to buttons in patron-toolbar.inc
Product: Koha Reporter: Magnus Enger <magnus>
Component: PatronsAssignee: Magnus Enger <magnus>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: trivial    
Priority: P5 - low CC: gmcharlt, jonathan.druart, katrin.fischer, kyle.m.hall
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 20205 - Add IDs to buttons in patron-toolbar.inc
Bug 20205 - Add IDs to buttons in patron-toolbar.inc
k
Bug 20205: Add IDs to buttons in patron-toolbar.inc

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!