Bugzilla – Attachment 173929 Details for
Bug 38305
Can't delete or archive suggestions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38305: Can't delete or archive suggestions
Bug-38305-Cant-delete-or-archive-suggestions.patch (text/plain), 3.57 KB, created by
Katrin Fischer
on 2024-11-04 15:40:31 UTC
(
hide
)
Description:
Bug 38305: Can't delete or archive suggestions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2024-11-04 15:40:31 UTC
Size:
3.57 KB
patch
obsolete
>From cc67775b6f8a101677ecebf37ef5d6a1ef70ac45 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 30 Oct 2024 17:41:45 +0000 >Subject: [PATCH] Bug 38305: Can't delete or archive suggestions > >This patch corrects JS on the suggestions page so that the delete, >archive, and unarchive controls work. > >The patch also modifies the markup of the "Delete" button so that it is >consisten with other pages. > >To test, apply the patch and go to the suggestions page in the staff >interface. > >- Log in to the staff interface as a user with "suggestions_manage" > permission. >- If necessary, create a few suggestions to test with. >- From the table of suggestions, click the secondary menu on the "Edit" > button for one of the suggestions. > - Choose "Delete." You should get a confirmation dialog. Both the "OK" > and "Cancel" options should work as expected. > - Choose "Archive." There won't be a confirmation, and the title > should disappear from the list. > - To test whether the suggestion was archived, search for it using > the sidebar form, checking the "Include archived" checkbox. The > suggestion should show up in the list with an "Archived" label. > - Clicking the "Edit" secondary menu on the archived suggestion > should trigger a menu with an "Unarchive" option. Click that > and confirm that the suggestion is no longer archived. >- Now log in as a user with only "suggestions_delete" permission but not > "suggestions_manage" > - In the list of suggestions each title should have a "delete" button. > - Clicking the delete button should trigger a confirmation dialog. > Both the "OK" and "Cancel" options should work as expected. > >Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index a37d78c111e..ece937647aa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -882,7 +882,7 @@ > </ul> > </div> > [% ELSIF CAN_user_suggestions_suggestions_delete %] >- <button data-op="cud-delete" data-suggestionid="[% s.suggestionid | html %]" class="btn btn-default trigger_action">Delete</button> >+ <button data-op="cud-delete" data-suggestionid="[% s.suggestionid | html %]" class="btn btn-xs btn-default trigger_action"><i class="fa fa-trash-can"></i> Delete</button> > [% END %] > </td> > </tr> >@@ -1437,7 +1437,7 @@ > $("." + target).toggle(); > }); > >- $("button.trigger_action").on("click", function(e) { >+ $(".trigger_action").on("click", function(e) { > var id = $(this).data('suggestionid'); > var op = $(this).data('op'); > if ( op == 'cud-delete' && !confirm(_("Are you sure you want to delete this suggestion?")) ) { >-- >2.39.5
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 38305
:
173738
|
173834
|
173866
| 173929