Bugzilla – Attachment 25577 Details for
Bug 10751
Title should be mandatory for creating suggestions in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10751 - Title should be mandatory for creating suggestions in staff
Bug-10751---Title-should-be-mandatory-for-creating.patch (text/plain), 3.44 KB, created by
Jonathan Druart
on 2014-02-24 12:18:08 UTC
(
hide
)
Description:
Bug 10751 - Title should be mandatory for creating suggestions in staff
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-02-24 12:18:08 UTC
Size:
3.44 KB
patch
obsolete
>From 105f01929be6e28c5266a7c4ab47bedeff418176 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 21 Feb 2014 09:22:50 -0500 >Subject: [PATCH] Bug 10751 - Title should be mandatory for creating > suggestions in staff >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The form for adding a new purchase suggestion in the staff client >indicates that the title field is 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 Acquisitions -> >Suggestions -> New purchase suggestion. Try submitting the form without >entering a title. Doing so should trigger a validation warning. > >Submission of the form with valid data should work correctly. Editing an >existing suggestion should also work correctly. > >The patch displays a message 'Required' near the title field. >After submitting a empty title it changes to 'This field is required' >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >The title field is required since commit >d565fb02e9fca2ac9c506e4e7d44fd8b0d66f06a >This one makes it more consistent with formatting. It makes sense. >--- > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 2f1cfb0..ecd8a8e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -296,7 +296,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <div id="yui-main"> > <div class="yui-b"> > [% IF ( op_save ) %] >- <form id="add_edit" action="suggestion.pl" method="post"> >+ <form id="add_edit" action="suggestion.pl" method="post" class="validated"> > <input type="hidden" name="redirect" id="redirect" value="[% redirect %]" /> > <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /> > [% IF ( suggestionid ) %] >@@ -306,7 +306,11 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <h1>Enter a new purchase suggestion</h1> > [% END %] > <fieldset class="rows"> <legend>Bibliographic information</legend><ol> >- <li><label for="title" class="required">Title:</label><input type="text" id="title" name="title" size="80" maxlength="255" value="[% title |html %]" required="required" /></li> >+ <li> >+ <label for="title" class="required">Title:</label> >+ <input type="text" id="title" name="title" size="80" maxlength="255" value="[% title |html %]" required="required" class="required" /> >+ <span class="required">Required</span> >+ </li> > <li><label for="author">Author:</label><input type="text" id="author" name="author" size="50" maxlength="80" value="[% author %]"/></li> > <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" value="[% copyrightdate %]" /></li> > <li><label for="isbn">ISBN or ISSN or other standard number:</label><input type="text" id="isbn" name="isbn" size="50" maxlength="80" value="[% isbn %]"/></li> >-- >1.7.10.4
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 10751
:
25539
|
25559
|
25571
| 25577