From cd089028b8c5e8f2b15ed2d41ce79bb37873662d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 20 Feb 2014 15:42:37 -0500 Subject: [PATCH] Bug 11805 - Use validation plugin when creating new basket in Acquisitions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The page for adding a new basket in Acquisitions 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 Acquisitions -> Choose a vendor -> New basket. Try submitting the form without entering a basket name. This should trigger a validation warning. Submission of the form with valid data should work correctly. Editing an existing basket should also work correctly. Patch works as expected. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Works as expected, passes all tests and QA script. Tried adding a new basket with/without basket name and editing an existing basket editing/emptying the basket name. Signed-off-by: Galen Charlton --- .../prog/en/modules/acqui/basketheader.tt | 27 +++---------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt index 85fc94663a..84b318cdc0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt @@ -8,26 +8,6 @@ [% INCLUDE 'doc-head-close.inc' %] - [% INCLUDE 'header.inc' %] @@ -54,7 +34,7 @@ function Check(ff) {

Edit basket [% basketname %]

[% ELSE %]

Add a basket to [% booksellername %]

[% END %] -
+
    @@ -66,7 +46,8 @@ function Check(ff) { [% END %]
  1.   - + + Required
  2. @@ -136,7 +117,7 @@ function Check(ff) {
- + Cancel
-- 2.39.5