Bugzilla – Attachment 57944 Details for
Bug 15711
Deleting patroncard images has unexpected behaviour and is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 15711: Fixing the 'Delete selected' button on patroncard images
SIGNED-OFF-Bug-15711-Fixing-the-Delete-selected-bu.patch (text/plain), 3.07 KB, created by
Mark Tompsett
on 2016-12-02 19:43:50 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 15711: Fixing the 'Delete selected' button on patroncard images
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-12-02 19:43:50 UTC
Size:
3.07 KB
patch
obsolete
>From 0f089daf74302ba754d333b1e27bdd685188763f Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 24 Aug 2016 01:08:11 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 15711: Fixing the 'Delete selected' button > on patroncard images > >To test: >1) Go to Tools -> Patron Card Creator -> Manage images >2) Upload an image if you haven't already >3) Click Delete selected without selecting any images >4) Notice broken behaviour as described in Description >5) Apply patch, refresh page >6) Click Delete selected without selecting any images >7) Notice alert. Click OK >8) Select one image or more, click Delete selected >9) Notice confirm delete message. > >Sponsored-by: Catalyst IT > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > .../prog/en/modules/patroncards/image-manage.tt | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt >index 17387bd..f3e8430 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt >@@ -5,17 +5,19 @@ > //<![CDATA[ > function DeleteConfirm() { > var results = selected_images("delete"); >- if (results.images != -1) { >+ if (results.images) { > var msg = _("Are you sure you want to delete image(s): %s?").format(results.image_ids); > var answer = confirm(msg); > if (answer) { > window.location = "/cgi-bin/koha/patroncards/image-manage.pl?op=delete&" + results.images; >- } >- else { >+ } else { > return; // abort delete > } >+ } else { >+ alert(_("Please select image(s) to delete.")); > } >- }; >+ } >+ > function selected_images(op) { > var selected = new Array; > var image_ids = new Array; >@@ -25,16 +27,15 @@ > selected.push("image_id=" + document.delete_images.action[i].value); > image_ids.push(document.delete_images.action[i].value); > } >- }; >+ } > images = selected.join("&"); > return {images:images, image_ids:image_ids}; > } > else if (document.delete_images.action.checked){ > return {images:"batch_id="+document.delete_images.action.value, image_ids:document.delete_images.action.value}; >- }; >- alert(_("Please select image(s) to %s.").format(op)); >+ } > return (-1); >- }; >+ } > $(document).ready(function() { > $("#delete").click(function(){ > return DeleteConfirm(); >-- >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 15711
:
54801
|
54879
|
57877
|
57944
|
57945
|
58189
|
58190
|
58444
|
58445