Bugzilla – Attachment 57877 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]
Bug 15711: Fixing the 'Delete selected' button on patroncard images
Bug-15711-Fixing-the-Delete-selected-button-on-pat.patch (text/plain), 3.00 KB, created by
Aleisha Amohia
on 2016-12-02 03:31:53 UTC
(
hide
)
Description:
Bug 15711: Fixing the 'Delete selected' button on patroncard images
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2016-12-02 03:31:53 UTC
Size:
3.00 KB
patch
obsolete
>From 51bd90247632e9b181974b8123078968b8f034b8 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 24 Aug 2016 01:08:11 +0000 >Subject: [PATCH] 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> >--- > .../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