From 9458dc20be68186f8249e4ae4a7a105ed2a47ae7 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 21 Feb 2014 09:22:50 -0500 Subject: [PATCH] [Signed-off] 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 --- .../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
[% IF ( op_save ) %] -
+ [% IF ( suggestionid ) %] @@ -306,7 +306,11 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o

Enter a new purchase suggestion

[% END %]
Bibliographic information
    -
  1. +
  2. + + + Required +
  3. -- 1.7.10.4