Bug 16301 - Remove the use of "onclick" from SMS cellular providers template
authorOwen Leonard <oleonard@myacpl.org>
Wed, 20 Apr 2016 12:31:16 +0000 (08:31 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 15:51:08 +0000 (15:51 +0000)
commit6d7aa51a401b9a427ac143e53a8f898c15065eb6
treefda7a4cf5815f165956a2bd10232f567f7c9f381
parent69ceb326f61ce94bbac740078eb3ebb8f41a03a1
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/sms_providers.tt
koha-tmpl/intranet-tmpl/prog/js/sms_providers.js