From 4e4760887f667e37ba5d4c2cb217322625b3bda5 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 19 Dec 2014 08:06:49 -0500 Subject: [PATCH] Bug 10848 [QA Followup] - Title should behave the same as other required fields --- .../bootstrap/en/modules/opac-suggestions.tt | 30 +------------------- opac/opac-suggestions.pl | 1 + 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index 4eb0a6f..abe70a3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -29,17 +29,13 @@

Enter a new purchase suggestion

Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion

- [% IF (mandatoryfields) %]

Form fields labeled in red are mandatory. The more information you enter the easier it will be for the librarians to find the title you're requesting. - [% ELSE %] -

Only the title is required, but the more information you enter the easier it will be for the librarians to find the title you're requesting. - [% END %] The "Notes" field can be used to provide any additional information.

    -
  1. +
  2. @@ -322,30 +318,6 @@ [% END %] }); - function Check(f) { - var _alertString=""; - var alertString2; - - var FieldsRequired = [[% mandatoryfields %]]; - FieldsRequired.unshift("title"); - - for (var i = 0; i < FieldsRequired.length; i++) { - var lbl = FieldsRequired[i]; - if (!f[lbl] || (f[lbl].value.length != 0)) continue; - _alertString += _("- Some mandatory fields are missing") + "\n"; - break; - } - - if (_alertString.length == 0) { - return true; - } else { - alertString2 = _("Form not submitted because of the following problem(s)"); - alertString2 += "\n------------------------------------------------------------------------------------\n\n"; - alertString2 += _alertString; - alert(alertString2); - return false; - } - } //]]> [% END %] diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 770dd46..a397b62 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -169,6 +169,7 @@ my $mandatoryfields = ''; my %fh = map { ($_ && $supported_rf->{$_})? ('"'.$_.'"', 1): (); } (split(/\s*\|\s*/, $fldsreqsp)); + $fh{'"title"'} = 1; $mandatoryfields = join(',', (sort keys %fh)); } -- 1.7.2.5