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/).
Created attachment 25295 [details] [review] 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.
Created attachment 25902 [details] [review] [Signed-off] 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>
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.
Created attachment 26417 [details] [review] 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.
I should remember to take a look at this tomorrow...
Created attachment 27513 [details] [review] 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.
Created attachment 27514 [details] [review] Bug 11769 [Signed off][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.
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>
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.
Pushed to master. Thanks, Owen!