Bug 16752 - Remove the use of event attributes from some acquisitions templates
Summary: Remove the use of event attributes from some acquisitions templates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-16 11:54 UTC by Owen Leonard
Modified: 2017-06-14 22:15 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Transfer order (6.69 KB, patch)
2016-06-16 12:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Uncertain prices (4.61 KB, patch)
2016-06-16 12:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Funds (10.61 KB, patch)
2016-06-16 12:04 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Transfer order (6.68 KB, patch)
2016-07-21 14:46 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16752 - Remove the use of event attributes from some acquisitions templates - Uncertain prices (4.64 KB, patch)
2016-08-23 03:11 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16752 - Remove the use of event attributes from some acquisitions templates - Funds (10.63 KB, patch)
2016-08-23 03:11 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16752 - Remove the use of event attributes from some acquisitions templates - Transfer order (6.71 KB, patch)
2016-08-23 03:11 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16752 [Revised] Remove the use of event attributes from some acquisitions templates - Uncertain prices (4.74 KB, patch)
2016-08-26 13:55 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Funds (10.69 KB, patch)
2016-08-26 14:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Transfer order (6.77 KB, patch)
2016-08-26 14:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16752 [Revised] Remove the use of event attributes from some acquisitions templates - Uncertain prices (4.76 KB, patch)
2016-08-26 14:08 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-06-16 11:54:16 UTC
I'm working on patches to remove event attributes likes 'onclick' and 'onchange' from several acquisitions-related templates:

transferorder.tt
uncertainprices.tt
aqbudgets.tt
Comment 1 Owen Leonard 2016-06-16 12:04:27 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-06-16 12:04:31 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2016-06-16 12:04:34 UTC Comment hidden (obsolete)
Comment 4 Héctor Eduardo Castro Avalos 2016-07-18 16:08:29 UTC
Comment on attachment 52458 [details] [review]
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Transfer order

Hi Owen

>--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt
>+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt

>+        $(doocument).ready(function(){
>+            $(".confirm_transfer").on("click",function(){
>+                return confirm( _("Transfer order to this basket?") );
>+            });
>+        });
>     //]]>

I think there is a typo in your first patch "doocument"
Comment 5 Owen Leonard 2016-07-18 16:15:22 UTC
(In reply to Héctor Eduardo Castro Avalos from comment #4)
> I think there is a typo in your first patch "doocument"

Don't be afraid to mark something as "Failed QA." You don't have to be QA manager to do it.
Comment 6 Owen Leonard 2016-07-21 14:46:46 UTC Comment hidden (obsolete)
Comment 7 Aleisha Amohia 2016-08-23 03:11:16 UTC Comment hidden (obsolete)
Comment 8 Aleisha Amohia 2016-08-23 03:11:24 UTC Comment hidden (obsolete)
Comment 9 Aleisha Amohia 2016-08-23 03:11:30 UTC Comment hidden (obsolete)
Comment 10 Jonathan Druart 2016-08-23 11:05:07 UTC
I am not sure to understand how uncertainprices.pl is supposed to work but I think have found a regression:
- Change the price to something wrong
- focus out => alert
- Change the price to something ok
- Save => nothing happens
Comment 11 Owen Leonard 2016-08-26 13:55:20 UTC Comment hidden (obsolete)
Comment 12 Jonathan Druart 2016-08-26 14:08:05 UTC
Created attachment 54935 [details] [review]
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Funds

This patch modifies the funds administration page and other files
related to the process of searching for and selecting fund owners and
users in order to remove the use of event attributes like 'onclick.'

Also changed in this patch: I have revised the way the "select owner"
and "select user" controls look. They are now links with Font Awesome
icons.

- Go to Administration -> Funds and open a fund for editing.
- Test the process of adding and updating an owner:
  - Click the 'Select owner' link.
  - Search for and select an owner in the pop-up window.
  - Save the fund and verify that the owner was saved correctly.
  - Perform the same test with the 'Remove owner' link.
- Use the same process to test the addition and removal of users.
  - Confirm that the 'Remove' link works correctly before and after
    submitting the form to save changes to the fund.

This patch changes a file which is used by both the funds template and
the template used when setting a guarantor on a patron. To test the
changes in that context:

- Open a 'child' type patron record.
- Under 'Guarantor information,' test the process of setting and
  removing a guarantor to confirm that data is saved correctly.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2016-08-26 14:08:09 UTC
Created attachment 54936 [details] [review]
Bug 16752 - Remove the use of event attributes from some acquisitions templates - Transfer order

This patch removes the use of 'onclick' from the acquisitions transfer
order process. The patch also modifies the style of some links and
buttons to conform with current guidelines.

- Locate an open basket with items in it
- Click the 'Transfer' link for a title in the basket
- In the pop-up window:
  - Confirm that the 'Cancel' button at the bottom of the window is a
    Bootstrap-style button.
  - Search for a vendor; Confirm that the 'Choose' link is a
    Bootstrap-style button.
  - Choose a vendor; Confirm that the 'Choose' link on the following
    page is a Bootstrap-style button.
  - Confirm that clicking the 'Choose' button transfers the item to the
    correct basket.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Jonathan Druart 2016-08-26 14:08:15 UTC
Created attachment 54937 [details] [review]
Bug 16752 [Revised] Remove the use of event attributes from some acquisitions templates - Uncertain prices

This patch modifies the acquisitions uncertain prices template to remove
event attributes onclick and onchange.

Also changed on the uncertain prices page: Added a label to the orders
filter, removed redundant form submit function.

- Locate a vendor which has orders with uncertain prices
- Click the 'Uncertain prices' tab in the left-hand sidebar
- Enter invalid data in the "price" field for any order. Confirm that an
  error is triggered when the field loses focus.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

QA Revision: Corrected input type of submit button.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Kyle M Hall 2016-09-15 13:57:07 UTC
Pushed to master for 16.11, thanks Owen!