Bugzilla – Attachment 25823 Details for
Bug 11127
OPAC suggestion: the delete link is active when no suggestion selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 11127: OPAC suggestion: the delete link is active when no suggestion selected
Signed-off-Bug-11127-OPAC-suggestion-the-delete-li.patch (text/plain), 1.91 KB, created by
Marc Véron
on 2014-03-04 16:53:18 UTC
(
hide
)
Description:
[Signed-off] Bug 11127: OPAC suggestion: the delete link is active when no suggestion selected
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-03-04 16:53:18 UTC
Size:
1.91 KB
patch
obsolete
>From e8d47ca02715d19c79913f50405c788dda4e00a5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 24 Oct 2013 11:41:11 +0200 >Subject: [PATCH] [Signed-off] Bug 11127: OPAC suggestion: the delete link is > active when no suggestion selected >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To reproduce: >1/ go on opac-suggestions.pl >2/ create a suggestion >3/ click on the delete link without checking any checkbox >The form is submitted with a message "The selected suggestions have been >deleted.". > >Test plan: >0/ enable the bootstrap theme >1/ after applying the patch, click on delete without any checkbox >checked, a js alert should occur. >2/ check at least a cb and click on the delete link. The deletion should >work. > >Followed test plan. Patch behaves as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >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 44ecf6f..ff495cf 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -282,11 +282,19 @@ > enableCheckboxActions(); > }); > $("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Delete")+"</a>") >- .click(function(){ >+ .click(function(e){ >+ e.preventDefault(); > $("#myform").submit(); > return false; > }); > enableCheckboxActions(); >+ $("#myform").on('submit', function() { >+ if ( $("input:checked").size() < 1 ) { >+ alert(MSG_NO_RECORD_SELECTED); >+ return false; >+ } >+ return true; >+ }); > [% END %] > }); > >-- >1.7.10.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 11127
:
22349
|
25818
|
25823
|
26073
|
26120
|
26168
|
26307
|
26308
|
26309