Bug 16262 - Remove the use of "onclick" from acquisitions basket template
authorOwen Leonard <oleonard@myacpl.org>
Thu, 14 Apr 2016 17:40:17 +0000 (13:40 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 14:46:38 +0000 (14:46 +0000)
commit064cce955b64240c5a6a4c9e0b9cc2b878f96d68
treed681983d3cff60526e97746c27e1cde24dca2e8c
parente297342f52bcdbc09b4a0c1b4d28cbb50ae2518f
Bug 16262 - Remove the use of "onclick" from acquisitions basket template

In order to bring the acquisitions basket template into compliance with
coding guideline JS9, this patch changes with way some JavaScript events
are handled by moving JS handling out of the HTML markup.

Also changed: Replaced the use of [% script_name %] (which is
undefined), with the actual script path.

To test, apply the patch and locate an open basket in Acquisitions which
has more than one order in it.

- Test the "Managed by: Add user" button and verify that it triggers a
  popup where you can search for patrons.
  - Select two or more patrons to be managers for the basket.
  - Close the search windows and confirm that your choices appear on the
    basket page.
  - Click "Delete user" next to one of the patrons. The patron should be
    removed.
  - Click "Save changes" and verify that your choices are correctly
    saved.
  - Click "Delete user" next to one of the remaining patrons. The patron
    should be removed.
  - Click "Save changes" and verify that the patron stays deleted.
- In the list of orders, click the "Transfer" link and confirm that the
  correct pop-up window is triggered.
- Test the "Delete this basket" button in the toolbar. A modal window
  should be triggered.
  - In a basket with orders:
    - The "Delete basket and orders" button should do what it says,
      leaving associated bibliographic records intact.
    - The "Delete basket, orders, and records" button should do what it
      says, deleting any bibliographic records associated with orders.
  - In a basket with no orders:
    - The "Delete basket" button should work correctly.
- Test the "Create edifact order" button.
  - Click "Send EDI order" on the resulting page.
  - In the resulting dialog, "Are you sure you want to generate an
    edifact order," verify that both the "Yes" and "No" options work
    correctly.

Followed test plan, works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt