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.
Created attachment 48475 [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. https://bugs.koha-community.org/show_bug.cgi?id=15930
Sorry, looks like an aborted git-bz attach added a link to Bug 15930 to my commit message. Not intentional!
Bonus: This patch brings classsources.tt into compliance with the new JS9 coding guideline.
Created attachment 50500 [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>
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>
Pushed to master for the May 2016 release. Istutiy Owen!