Bugzilla – Attachment 34547 Details for
Bug 10848
Allow configuration of mandatory/required fields on the suggestion form in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10848 [QA Followup] - Title should behave the same as other required fields
Bug-10848-QA-Followup---Title-should-behave-the-sa.patch (text/plain), 3.98 KB, created by
Kyle M Hall (khall)
on 2014-12-19 14:15:47 UTC
(
hide
)
Description:
Bug 10848 [QA Followup] - Title should behave the same as other required fields
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-12-19 14:15:47 UTC
Size:
3.98 KB
patch
obsolete
>From 4e4760887f667e37ba5d4c2cb217322625b3bda5 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >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 @@ > <h1>Enter a new purchase suggestion</h1> > > <p>Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion</p> >- [% IF (mandatoryfields) %] > <p>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 %] >- <p>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.</p> > > <form action="/cgi-bin/koha/opac-suggestions.pl" id="newsuggestionform" onsubmit="return Check(this);" method="post"> > <fieldset class="rows"> > <ol> >- <li><label class="required" for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li> >+ <li><label for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" /></li> > <li><label for="author">Author:</label><input type="text" id="author" name="author" class="span6" maxlength="80" /></li> > <li><label for="copyrightdate">Copyright date:</label><input type="text" id="copyrightdate" name="copyrightdate" size="4" maxlength="4" /></li> > <li><label for="isbn">Standard number (ISBN, ISSN or other):</label><input type="text" id="isbn" name="isbn" maxlength="80" /></li> >@@ -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; >- } >- } > //]]> > </script> > [% 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
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 10848
:
28721
|
28722
|
28792
|
29091
|
29092
|
34317
|
34318
|
34319
|
34324
|
34325
|
34326
|
34544
|
34545
|
34546
|
34547
|
35830
|
54016
|
54017
|
54018
|
54019
|
54020
|
54021
|
54083
|
54084
|
54356
|
54430
|
54431
|
54432