Bugzilla – Attachment 27652 Details for
Bug 11769
Use validation plugin when creating new MARC framework
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11769 - Use validation plugin when creating new MARC framework
PASSED-QA-Bug-11769---Use-validation-plugin-when-c.patch (text/plain), 4.05 KB, created by
Katrin Fischer
on 2014-04-26 13:04:19 UTC
(
hide
)
Description:
[PASSED QA] Bug 11769 - Use validation plugin when creating new MARC framework
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-26 13:04:19 UTC
Size:
4.05 KB
patch
obsolete
>From 4e80972004ea530f29f174a7481d1ab1e260ebd0 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 14 Feb 2014 15:17:44 -0500 >Subject: [PATCH] [PASSED QA] Bug 11769 - Use validation plugin when creating > new MARC framework >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >--- > .../prog/en/modules/admin/biblio_framework.tt | 40 ++-------------------- > 1 file changed, 3 insertions(+), 37 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >index ec458b3..4ef8103 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/biblio_framework.tt >@@ -8,40 +8,6 @@ > </title> > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> >-//<![CDATA[ >- >-function isNotNull(f,noalert) { >- if (f.value.length ==0) { >- return false; >- } >- return true; >-} >-///////////////////////////////////////////////////////////////////////////////////////////////////////////////// >-function Check(f) { >- var ok=1; >- var _alertString=""; >- var alertString2; >- if (f.frameworkcode.value.length==0) { >- _alertString += "\n- " + _("Framework code missing"); >- } >- if (!(isNotNull(window.document.Aform.frameworktext))) { >- _alertString += "\n- " + _("Description missing"); >- } >- if (_alertString.length==0) { >- document.Aform.submit(); >- } else { >- alertString2 = _("Form not submitted because of the following problem(s)"); >- alertString2 += "\n------------------------------------------------------------------------------------\n"; >- alertString2 += _alertString; >- alert(alertString2); >- return false; >- } >- return true; >-} >- >-//]]> >-</script> >-<script type="text/javascript"> > /* Import/Export from/to spreadsheet */ > > var importing = false; >@@ -141,7 +107,7 @@ function Check(f) { > > [% IF ( add_form ) %] > <h1>[% IF ( frameworkcode ) %]Modify framework text[% ELSE %]Add framework[% END %]</h1> >- <form action="[% script_name %]" name="Aform" method="post" onsubmit="return Check(this);"> >+ <form action="[% script_name %]" name="Aform" method="post" class="validated"> > <input type="hidden" name="op" value="add_validate" /> > <fieldset class="rows"> > <ol> >@@ -150,10 +116,10 @@ function Check(f) { > <input type="hidden" name="modif" value="1" /> > </li> > [% ELSE %] >- <li><label for="frameworkcode">Framework code: </label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></li> >+ <li><label for="frameworkcode">Framework code: </label><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" required="required" class="required" /></li> > [% END %] > <li><label for="description">Description: </label> >- <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% frameworktext |html %]" /></li></ol></fieldset> >+ <input type="text" name="frameworktext" id="description" size="40" maxlength="80" value="[% frameworktext |html %]" required="required" class="required" /></li></ol></fieldset> > <fieldset class="action"> <input type="submit" value="Submit" class="submit" /></fieldset> > </form> > [% END %] >-- >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 11769
:
25295
|
25902
|
26417
|
27513
|
27514
| 27652 |
27653