Bug 16301 - Remove the use of "onclick" from SMS cellular providers template
Summary: Remove the use of "onclick" from SMS cellular providers template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/admin/sms_providers.pl
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-19 18:48 UTC by Owen Leonard
Modified: 2016-12-05 21:27 UTC (History)
4 users (show)

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


Attachments
Bug 16301 - Remove the use of "onclick" from SMS cellular providers template (5.15 KB, patch)
2016-04-20 12:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16301 - Remove the use of "onclick" from SMS cellular providers template (5.28 KB, patch)
2016-04-20 15:30 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 16301 - Remove the use of "onclick" from SMS cellular providers template (5.34 KB, patch)
2016-04-25 10:30 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 Owen Leonard 2016-04-19 18:48:27 UTC
There are several places where an "onclick" attribute is used in admin/sms_providers.tt. These should be rewritten so that JS functionality can be separate from the markup.
Comment 1 Owen Leonard 2016-04-20 12:46:38 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-04-20 15:30:22 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-25 10:30:01 UTC
Created attachment 50626 [details] [review]
[PASSED QA] Bug 16301 - Remove the use of "onclick" from SMS cellular providers template

This patch refactors some of the JavaScript in the SMS cellular
providers template so that event attributes are removed from the markup.

This patch also updates the markup for the "Edit" and "Delete" buttons
to make them consistent with similar buttons in Koha.

To test you must have the SMSSendDriver system preference set to
"Email."

- Go to Administration -> SMS cellular providers.
- If necessary, create a new SMS cellular provider.
- Edit at least one patron to use an SMS cellular provider under "Patron
  messaging preferences."
- In the table of SMS cellular providers:
  - Click the "Edit" button. The correct edit form should be displayed.
  - Click the "Delete" button next to a provider which is not used by
    any patrons. You should see an error message, "Are you sure you want
    to delete [provider name]." Test both cancel and confirm.
  - Click the "Delete" button next to a provider which is in use by one
    or more patrons. YOu should see an error message, "Are you sure you
    want to delete [provider name]? X patron(s) are using it!" Test both
    cancel and confirm.

Followed test plan, works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Kyle M Hall 2016-04-29 15:52:10 UTC
Pushed to master for the Koha 16.05 release. Thanks Owen!