Bug 11769

Summary: Use validation plugin when creating new MARC framework
Product: Koha Reporter: Owen Leonard <oleonard>
Component: System AdministrationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: dcook, gmcharlt, katrin.fischer, veron
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/admin/biblio_framework.pl?op=add_form
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 11764, 11765    
Bug Blocks:    
Attachments: Bug 11769 - Use validation plugin when creating new MARC framework
[Signed-off] Bug 11769 - Use validation plugin when creating new MARC framework
Bug 11769 [Follow-up] Use validation plugin when creating new MARC framework
Bug 11769 [Follow-up] Use validation plugin when creating new MARC framework
Bug 11769 [Signed off][Follow-up] Use validation plugin when creating new MARC framework
[PASSED QA] Bug 11769 - Use validation plugin when creating new MARC framework
[PASSED QA] Bug 11769 [Follow-up] Use validation plugin when creating new MARC framework

Description Owen Leonard 2014-02-14 20:14:55 UTC
The new MARC framework entry form uses custom validation JavaScript which can be easily replaced with HTML5 validation attributes in conjunction with Koha's built-in validation plugin (http://jqueryvalidation.org/documentation/).
Comment 1 Owen Leonard 2014-02-14 20:21:18 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2014-03-06 15:30:50 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-03-16 14:01:16 UTC
This works as described, but I wonder why the fields don't show up as Required before submitting the form. They are missing the red font and note at the end we have on other pages. Switching to "Failed QA" for Feedback from Owen.
Comment 4 Owen Leonard 2014-03-17 17:17:15 UTC Comment hidden (obsolete)
Comment 5 David Cook 2014-03-26 06:43:24 UTC
I should remember to take a look at this tomorrow...
Comment 6 David Cook 2014-04-24 02:18:40 UTC Comment hidden (obsolete)
Comment 7 David Cook 2014-04-24 02:20:28 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2014-04-26 13:04:19 UTC
Created attachment 27652 [details] [review]
[PASSED QA] Bug 11769 - Use validation plugin when creating new MARC framework

The page for adding a new MARC framework includes some custom form
validation JavaScript which can be removed in favor of HTML5 validation
attributes and Koha's built-in validation plugin. This patch does so.

To test, apply the patch and go to Administration -> MARC bibliographic
framework -> New framework. Try submitting the form without entering a
tag number. This should trigger a validation warning.

Submission of the form with valid data should work correctly. Editing an
existing framework should also work correctly.

Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 9 Katrin Fischer 2014-04-26 13:04:21 UTC
Created attachment 27653 [details] [review]
[PASSED QA] Bug 11769 [Follow-up] Use validation plugin when creating new MARC framework

This follow up adds the correct "required" style to the required form
fields as well as the "required" text after each required field.

To test, apply all patches and go to Administration -> MARC
bibliographic framework -> New framework. The framework code and
description fields should show that they are required.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described and feels a million times better.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, template changes only.
Comment 10 Galen Charlton 2014-04-27 22:05:47 UTC
Pushed to master.  Thanks, Owen!