Bugzilla – Attachment 25566 Details for
Bug 11805
Use validation plugin when creating new basket in Acquisitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11805 - Use validation plugin when creating new basket in Acquisitions
PASSED-QA-Bug-11805---Use-validation-plugin-when-c.patch (text/plain), 3.86 KB, created by
Katrin Fischer
on 2014-02-23 22:12:55 UTC
(
hide
)
Description:
[PASSED QA] Bug 11805 - Use validation plugin when creating new basket in Acquisitions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-02-23 22:12:55 UTC
Size:
3.86 KB
patch
obsolete
>From 13a55923a607d9a32938c25327985d17a7431249 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 20 Feb 2014 15:42:37 -0500 >Subject: [PATCH] [PASSED QA] Bug 11805 - Use validation plugin when creating > new basket in Acquisitions >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >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 <veron@veron.ch> > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >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. >--- > .../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 85fc946..84b318c 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 @@ > </title> > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript" src="[% themelang %]/js/acq.js"></script> >-<script type="text/javascript"> >-//<![CDATA[ >-// to check if the data are correctly entered. >-function Check(ff) { >- var ok=0; >- var _alertString="Form not submitted because of the following problem(s)"; >- _alertString +="\n-------------------------------------------------------------------\n\n"; >- if (!(isNotNull(ff.basketname,0))){ >- ok=1; >- _alertString += "- name missing\n"; >- } >- if (ok) { // if there is a problem >- alert(_alertString); >- return false; >-} >-// if all is good >- ff.submit(); >-} >-//]]> >-</script> > </head> > <body id="acq_basketheader" class="acq"> > [% INCLUDE 'header.inc' %] >@@ -54,7 +34,7 @@ function Check(ff) { > <h1>Edit basket [% basketname %]</h1> > [% ELSE %]<h1>Add a basket to [% booksellername %]</h1> > [% END %] >- <form name="Aform" action="[% script_name %]" method="post"> >+ <form name="Aform" action="[% script_name %]" method="post" class="validated"> > <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> > <fieldset class="rows"> > <ol> >@@ -66,7 +46,8 @@ function Check(ff) { > [% END %] > <li> > <label for="basketname" class="required">Basket name: </label> >- <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname %]" class="focus" /> >+ <input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname %]" required="required" class="required" /> >+ <span class="required">Required</span> > </li> > <li> > <label for="billingplace">Billing place:</label> >@@ -136,7 +117,7 @@ function Check(ff) { > </fieldset> > <fieldset class="action"> > <input type="hidden" name="op" value="add_validate" /> >- <input type="button" value="Save" onclick="Check(this.form);" /> >+ <input type="submit" value="Save" /> > <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a> > </fieldset> > </form> >-- >1.8.3.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11805
:
25524
|
25562
| 25566