Bug 15938 - Use validation plugin when adding or editing classification sources and filing rules
Summary: Use validation plugin when adding or editing classification sources and filin...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/admin/classsources.pl
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-29 17:06 UTC by Owen Leonard
Modified: 2016-12-05 21:27 UTC (History)
2 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 15938 - Use validation plugin when adding or editing classification sources and filing rules (8.30 KB, patch)
2016-02-29 17:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 15938 - Use validation plugin when adding or editing classification sources and filing rules (8.34 KB, patch)
2016-04-21 12:29 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15938 - Use validation plugin when adding or editing classification sources and filing rules (8.41 KB, patch)
2016-04-23 06:56 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-02-29 17:06:11 UTC
In Administration -> Classification sources there is some embedded JavaScript which checks for empty form values. That kind of task is easily handled by the globally-included validation plugin.
Comment 1 Owen Leonard 2016-02-29 17:13:42 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-02-29 17:15:24 UTC
Sorry, looks like an aborted git-bz attach added a link to Bug 15930 to my commit message. Not intentional!
Comment 3 Owen Leonard 2016-04-15 18:09:32 UTC
Bonus: This patch brings classsources.tt into compliance with the new JS9 coding guideline.
Comment 4 Marc Véron 2016-04-21 12:29:12 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2016-04-23 06:56:07 UTC
Created attachment 50597 [details] [review]
Bug 15938 - Use validation plugin when adding or editing classification sources and filing rules

In Administration -> Classification sources there is some embedded
JavaScript which checks for empty form values. This patch removes that
JS and adds validation using the globally-included validation plugin
instead.

To test, apply the patch and go to Administration -> Classification
sources.

- Click to add a new classification source and confirm that you cannot
  submit the form with empty required values.
- Edit an existing classification source and confirm that you cannot
  empty a required field and submit the form.
- Repeat the previous two steps with filing rules.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Kyle M Hall (khall) 2016-04-29 13:32:01 UTC
Pushed to master for the May 2016 release. Istutiy Owen!