Bugzilla – Attachment 64232 Details for
Bug 18762
Some tests are noisy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18656 - Require confirmation of deletion of files from patron record
Bug-18656---Require-confirmation-of-deletion-of-fi.patch (text/plain), 2.76 KB, created by
Lee Jamison
on 2017-06-12 17:42:41 UTC
(
hide
)
Description:
Bug 18656 - Require confirmation of deletion of files from patron record
Filename:
MIME Type:
Creator:
Lee Jamison
Created:
2017-06-12 17:42:41 UTC
Size:
2.76 KB
patch
obsolete
>From a8426d74d88f2c2590864d805c940f0cf6afe0f2 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 24 May 2017 13:46:50 +0000 >Subject: [PATCH] Bug 18656 - Require confirmation of deletion of files from > patron record > >This patch adds a JavaScript confirm to the deletion of files. It also >styles the file deletion link as a Bootstrap button. > >To test, apply the patch and open the "Files" page for a patron who has >files attached. > >- Verify that clicking any "delete" link prompts for a confirmation. >- Verify that confirming the dialog triggers the deletion of the correct > file. >- Verify that canceling the confirmation dialog aborts the deletion. >- Confirm that the "Delete" button looks correct. > >Signed-off-by: David Roberts <david.roberts@ptfs-europe.com> > >Revision for QA: Replaced '.click(function' with '.on("click",function' > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> > >https://bugs.koha-community.org/show_bug.cgi?id=18762 >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt >index 15bdc1b..ba4cc1f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt >@@ -3,6 +3,19 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Files for [% INCLUDE 'patron-title.inc' %]</title> > [% INCLUDE 'doc-head-close.inc' %] >+<script type="text/javascript"> >+ $(document).ready(function(){ >+ $(".confirmdelete").on("click", function(){ >+ $(this).parents('tr').addClass("warn"); >+ if(confirm(_("Are you sure you want to delete this file?"))){ >+ return true; >+ } else { >+ $(this).parents('tr').removeClass("warn"); >+ return false; >+ } >+ }); >+}); >+</script> > </head> > <body id="pat_files" class="pat"> > [% INCLUDE 'header.inc' %] >@@ -44,7 +57,7 @@ > <td>[% f.file_type %]</td> > <td>[% f.file_description %]</td> > <td>[% f.date_uploaded | $KohaDates %]</td> >- [% IF CAN_user_borrowers %]<td><a href="?borrowernumber=[% borrowernumber %]&op=delete&file_id=[% f.file_id %]">Delete</a></td>[% END %] >+ [% IF CAN_user_borrowers %]<td><a class="btn btn-default btn-xs confirmdelete" href="?borrowernumber=[% borrowernumber %]&op=delete&file_id=[% f.file_id %]"><i class="fa fa-trash"></i> Delete</a></td>[% END %] > </tr> > [% END %] > </tbody> >-- >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 18762
:
64114
|
64115
|
64116
|
64117
|
64170
|
64175
|
64232
|
64234
|
64294
|
64295
|
64296