Bugzilla – Attachment 54741 Details for
Bug 17166
OPAC suggestion form: making Title a required field to remove onclick Check function
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17166: OPAC suggestion form: Make Title a required field
Bug-17166-OPAC-suggestion-form-Make-Title-a-requir.patch (text/plain), 3.53 KB, created by
Aleisha Amohia
on 2016-08-23 03:51:48 UTC
(
hide
)
Description:
Bug 17166: OPAC suggestion form: Make Title a required field
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-08-23 03:51:48 UTC
Size:
3.53 KB
patch
obsolete
>From 67ea43d220c4e3f84e0d17f6fba1ee8f70e7a888 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 23 Aug 2016 03:49:29 +0000 >Subject: [PATCH] Bug 17166: OPAC suggestion form: Make Title a required field > >To test: >1) Log in to OPAC >2) Go to your suggestions >3) New suggestion >4) Attempt to submit a suggestion without the title >5) Notice pop-up error box >6) Apply patch and refresh page >7) Attempt to submit a suggestion without the title >8) Notice error bubble and form cannot submit > >Sponsored-by: Catalyst IT >--- > .../bootstrap/en/modules/opac-suggestions.tt | 22 ++-------------------- > 1 file changed, 2 insertions(+), 20 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 a6a515a..a92ee6b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -40,7 +40,7 @@ > <form action="/cgi-bin/koha/opac-suggestions.pl" 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 class="required" for="title">Title:</label><input type="text" id="title" name="title" class="span6" maxlength="255" required="required" /> <span class="required">Required</span></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> >@@ -89,7 +89,7 @@ > <fieldset class="action"> > <input type="hidden" name="suggested_by_anyone" value="[% suggested_by_anyone %]" /> > <input type="hidden" name="op" value="add_confirm" /> >- <input type="submit" onclick="Check(this.form); return false;" class="btn" value="Submit your suggestion" /> <a class="action" href="/cgi-bin/koha/opac-suggestions.pl">Cancel</a> >+ <input type="submit" class="btn" value="Submit your suggestion" /> <a class="action" href="/cgi-bin/koha/opac-suggestions.pl">Cancel</a> > </fieldset> > </form> > [% END %] >@@ -338,24 +338,6 @@ > }); > [% END %] > }); >- >- function Check(f) { >- var _alertString=""; >- var alertString2; >- >- if(f.title.value.length ==0){ >- _alertString += _("- You must enter a Title") + "\n"; >- } >- >- if (_alertString.length==0) { >- f.submit(); >- } else { >- alertString2 = _("Form not submitted because of the following problem(s)"); >- alertString2 += "\n------------------------------------------------------------------------------------\n\n"; >- alertString2 += _alertString; >- alert(alertString2); >- } >- } > //]]> > </script> > [% END %] >-- >2.1.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 17166
: 54741