Bugzilla – Attachment 65349 Details for
Bug 18980
Add an explanation when Anyone permission has no actual effect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18980: Remove js function Check from opac-shelves
Bug-18980-Remove-js-function-Check-from-opac-shelv.patch (text/plain), 3.44 KB, created by
Nick Clemens (kidclamp)
on 2017-07-31 14:05:35 UTC
(
hide
)
Description:
Bug 18980: Remove js function Check from opac-shelves
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-07-31 14:05:35 UTC
Size:
3.44 KB
patch
obsolete
>From ddc22f2de5165cafd9c5ce371b598c4535dcbbf4 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 21 Jun 2017 16:53:56 +0200 >Subject: [PATCH] Bug 18980: Remove js function Check from opac-shelves >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This function only serves to check if the shelf name is not empty. It >does not even work since it incorrectly refers to f.addshelf (while it >should test #shelfname). >We can solve this and improve consistency by doing the same as in the >staff template with html5 required. > >Test plan: >[1] Without this patch it was possible to add a list without a name in > OPAC (with js error: TypeError: f.addshelf is undefined). >[2] With this patch, verify that you cannot do this anymore. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Lee Jamison <ldjamison@marywood.edu> > >Signed-off-by: Marc Véron <veron@veron.ch> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 22 ++-------------------- > 1 file changed, 2 insertions(+), 20 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >index 0417531..f662c88 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -549,7 +549,7 @@ > <ol> > <li> > <label class="required" for="shelfname">List name: </label> >- <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname |html %]" /></li> >+ <input type="text" id="shelfname" name="shelfname" maxlength="255" value="[% shelf.shelfname |html %]" required="required" class="required"/> <span class="required">Required</span></li> > <li> > <label for="sortfield" >Sort this list by: </label> > <select name="sortfield" id="sortfield"> >@@ -603,7 +603,7 @@ > </fieldset> > > <fieldset class="action"> >- <input type="submit" onclick="Check(this.form); return false;" value="Save" class="btn" /> >+ <input type="submit" value="Save" class="btn" /> > [% IF referer == 'view' %] > <a href="/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber %]" class="cancel">Cancel</a> > [% ELSE %] >@@ -938,24 +938,6 @@ $(function() { > AdjustRemark(); > }); // document.ready > >-function Check(f) { >- var _alertString=""; >- var alertString2; >- >- if(f.addshelf.value.length ==0){ >- _alertString += _("- You must enter a list name") + "\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); >- } >-} >- > function AdjustRemark() { > var category; > if( $("#category").length > 0 ) { >-- >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 18980
:
65229
|
65230
|
65231
|
65232
|
65273
|
65274
|
65275
|
65276
|
65347
|
65348
| 65349 |
65350