Bug 16286 - Use validation plugin when adding or editing patron category
Summary: Use validation plugin when adding or editing patron category
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/admin/categories.pl?op=...
Keywords:
Depends on:
Blocks: 16795
  Show dependency treegraph
 
Reported: 2016-04-18 16:24 UTC by Owen Leonard
Modified: 2018-06-04 20:10 UTC (History)
3 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:
Circulation function:


Attachments
Bug 16286 - Use validation plugin when adding or editing patron category (11.82 KB, patch)
2016-04-20 14:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16286 - Use validation plugin when adding or editing patron category (11.95 KB, patch)
2016-04-21 08:58 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 16286 - Use validation plugin when adding or editing patron category (12.02 KB, patch)
2016-04-24 23:41 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-18 16:24:34 UTC
There is a lot of custom form validation JavaScript in the patron category template which can be handled instead by the jQuery validation plugin.
Comment 1 Owen Leonard 2016-04-20 14:39:50 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-04-21 08:58:17 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-24 23:41:24 UTC
Created attachment 50605 [details] [review]
[PASSED QA] Bug 16286 - Use validation plugin when adding or editing patron category

This patch updates the patron category entry form so that it is
validated using the staff client's globally-included form validation
plugin. This patch also moves the page's JavaScript into a separate
file.

To test, apply the patch and go to Administration -> Patron categories.

- Create a new category. Try to submit the form with the following
  fields empty:
  - Category code
  - Description
  - Both enrollment period fields
  - Category type
- Try to enter data in the category code field which contains characters
  other than letters, numbers, hyphens, or underscores.
- Try to enter non-numeric data in the following fields:
  - Enrollment period in months
  - Age required
  - Upper age limit
  - Enrollment fee
  - Hold fee
- Try to submit the form with both enrollment period fields filled.

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 (khall) 2016-04-29 14:56:45 UTC
Pushed to master for the 16.05 release. Thanks Owen!