Summary: | Use validation plugin when creating new list | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Lists | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, gmcharlt, jonathan.druart, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
URL: | /cgi-bin/koha/virtualshelves/shelves.pl?shelves=1 | ||
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 11789 - Use validation plugin when creating new list
Bug 11789 - Use validation plugin when creating new list Bug 11789 - Use validation plugin when creating new list Bug 11789 - Use validation plugin when creating new list |
Description
Owen Leonard
2014-02-18 20:37:21 UTC
Created attachment 25396 [details] [review] Bug 11789 - Use validation plugin when creating new list The page for adding a new list 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. Other edits: Minor validation fixes. To test, apply the patch and go to Lists -> New list. Try submitting the form without entering a list name. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing list should also work correctly. Created attachment 25408 [details] [review] Bug 11789 - Use validation plugin when creating new list The page for adding a new list 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. Other edits: Minor validation fixes. To test, apply the patch and go to Lists -> New list. Try submitting the form without entering a list name. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing list should also work correctly. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Comment on attachment 25408 [details] [review] Bug 11789 - Use validation plugin when creating new list Review of attachment 25408 [details] [review]: ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ +430,3 @@ > <ol> > + <li><label class="required" for="addshelf">List name:</label><input id="addshelf" type="text" name="addshelf" size="25" required="required" class="required" /> > + <span class="required">Required</span> Are you sure this "required" string is useful? The label is already in red. I just passed QA on bug 11766 and bug 11767 and you didn't add it. Should we be consistent for all forms? Created attachment 25483 [details] [review] Bug 11789 - Use validation plugin when creating new list The page for adding a new list 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. Other edits: Minor validation fixes. To test, apply the patch and go to Lists -> New list. Try submitting the form without entering a list name. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing list should also work correctly. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> (In reply to Jonathan Druart from comment #3) > Are you sure this "required" string is useful? The label is already in red. > I just passed QA on bug 11766 and bug 11767 and you didn't add it. > Should we be consistent for all forms? Owen's answer (IRC): I am trying to consistently add the "Required" note, and I realize I missed it on some of my recent patches. I think it's useful. Not everyone is going to know what the red color indicates. This patch no longer applies. Created attachment 25520 [details] [review] Bug 11789 - Use validation plugin when creating new list The page for adding a new list 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. Other edits: Minor validation fixes. To test, apply the patch and go to Lists -> New list. Try submitting the form without entering a list name. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing list should also work correctly. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Pushed to master. Thanks, Owen! Pushed to 3.14.x, will be in 3.14.07 |