Bug 16549

Summary: Remove the use of "onclick" from header search forms
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: colin.campbell, f.demians, kyle
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16903
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 16549 - Remove the use of "onclick" from header search forms
Bug 16549 - Remove the use of "onclick" from header search forms
Bug 16549 - Remove the use of "onclick" from header search forms

Description Owen Leonard 2016-05-19 01:21:04 UTC
The header search forms use "onclick" to trigger the "keep_text()" function. This functionality can be moved to the globally-included js file.
Comment 1 Owen Leonard 2016-05-19 01:57:26 UTC Comment hidden (obsolete)
Comment 2 Claire Gravely 2016-06-03 09:53:52 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-06-21 13:12:37 UTC
Created attachment 52646 [details] [review]
Bug 16549 - Remove the use of "onclick" from header search forms

This patch removes the use of "onclick" from all header search forms for
the purpose of triggering the "keep_text" function. This behavior is now
handled in the globally-included JS file.

To test, apply the patch and clear your cache if necessary.

- Enter text in any header search form field. Click to each other tab
  in the header and confirm that your text is copied to each.
- Test the behavior of the header search form on at least one page where
  each is included:

  - The staff client home page
  - The advanced search page
  - The authorities home page
  - The administration home page
  - The cataloging home page
  - The checkin page
  - The circulation home page
  - The patrons home page
  - Acquisitions -> Vendor -> Contracts
  - Administration -> Cities
  - Administration -> Currencies and exchange rates
  - Administration -> Patron categories
  - Administration -> Printers (why is this page still around?)
  - Administration -> System preferences
  - Administration -> Z39.50/SRU servers
  - Tools -> Notices & slips

This patch modifies does not fix the existing (unreported) bug which
prevents the keep text function from working in the include file used on
these pages:

  - Acquisitions -> Vendor -> Basket -> New order from suggestion
  - Administration -> Budgets
  - The serials home page

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Kyle M Hall 2016-06-24 13:48:31 UTC
Pushed to master for 16.11, thanks Owen!
Comment 5 Frédéric Demians 2016-08-01 13:17:57 UTC
Pushed in 16.05. Will be in 16.05.02.
Comment 6 Colin Campbell 2016-08-16 10:07:49 UTC
This patch appears to introduce a bug reverting previous behaviour. In the staff client search the catalogue when results are displayed instead of the active tab remaining 'Search the catalogue' it is switched to 'Check out'. Users are findling this behaviour irritating
Comment 7 Owen Leonard 2016-08-31 14:00:21 UTC
(In reply to Colin Campbell from comment #6)
> This patch appears to introduce a bug reverting previous behaviour.

This should be fixed by Bug 16903, which says it has been pushed to master but I don't think it really has been.
Comment 8 Owen Leonard 2016-09-02 15:12:08 UTC
> This should be fixed by Bug 16903

16903 has now been pushed to master, so please re-test!