Bugzilla – Attachment 25525 Details for
Bug 11806
Use validation plugin when creating new OAI set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11806 - Use validation plugin when creating new OAI set
Bug-11806---Use-validation-plugin-when-creating-ne.patch (text/plain), 2.68 KB, created by
Owen Leonard
on 2014-02-20 21:11:47 UTC
(
hide
)
Description:
Bug 11806 - Use validation plugin when creating new OAI set
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-02-20 21:11:47 UTC
Size:
2.68 KB
patch
obsolete
>From 91bb2a205a09c12705667035f12c3778e2f62081 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 20 Feb 2014 16:08:02 -0500 >Subject: [PATCH] Bug 11806 - Use validation plugin when creating new OAI set >Content-Type: text/plain; charset="utf-8" > >The form for adding a new OAI indicates that two fields are >required but does nothing to enforce this rule. This can be >handled client-side with HTML5 validation attributes and Koha's built-in >validation plugin. This patch implements this. > >To test, apply the patch and go to Administration -> OAI sets >configuration -> New set. Try submitting the form without entering a >setSpec and/or setName. Doing so should trigger a validation warning. > >Submission of the form with valid data should work correctly. Editing an >existing set should also work correctly. >--- > .../prog/en/modules/admin/oai_sets.tt | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt >index a480b74..02eaf39 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/oai_sets.tt >@@ -32,7 +32,7 @@ function delDescField(minusButton) { > <div id="yui-main"> > <div class="yui-b"> > [% IF ( op_new || op_mod ) %] >- <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl"> >+ <form method="post" action="/cgi-bin/koha/admin/oai_sets.pl" class="validated"> > [% IF ( op_new ) %] > <h2>Add a new OAI set</h2> > <input type="hidden" name="op" value="savenew" /> >@@ -45,11 +45,13 @@ function delDescField(minusButton) { > <ol> > <li> > <label for="spec" class="required">setSpec: </label> >- <input type="text" id="spec" name="spec" value="[% spec %]" /> >+ <input type="text" id="spec" name="spec" value="[% spec %]" required="required" class="required" /> >+ <span class="required">Required</span> > </li> > <li> > <label for="name" class="required">setName: </label> >- <input type="text" id="name" name="name" value="[% name %]" /> >+ <input type="text" id="name" name="name" value="[% name %]" required="required" class="required" /> >+ <span class="required">Required</span> > </li> > [% FOREACH desc IN descriptions %] > <li> >-- >1.7.9.5
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 11806
:
25525
|
25903
|
26376