Bugzilla – Attachment 64512 Details for
Bug 18834
Show "Anyone seeing this list" permission only for shared and public lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18834: Remove js function Check from opac-shelves
Bug-18834-Remove-js-function-Check-from-opac-shelv.patch (text/plain), 3.22 KB, created by
Marcel de Rooy
on 2017-06-22 07:23:57 UTC
(
hide
)
Description:
Bug 18834: Remove js function Check from opac-shelves
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-06-22 07:23:57 UTC
Size:
3.22 KB
patch
obsolete
>From 42b2461f052d9902a6fcc2201dcae78e78604c19 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 18834: Remove js function Check from opac-shelves >Content-Type: text/plain; charset=utf-8 > >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. >--- > .../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 c267248..3997490 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt >@@ -550,7 +550,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"> >@@ -604,7 +604,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 %] >@@ -937,24 +937,6 @@ $(function() { > [% END %] > }); // 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 AdjustPerms() { > var category = $("#category").val(); > var count_perms = $("#allow_changes_from option").length; >-- >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 18834
:
64491
|
64492
|
64493
|
64510
|
64511
|
64512
|
64520
|
64521
|
64522
|
64523
|
64524
|
64525
|
64545
|
64546
|
64547
|
64548