From 3eafe6782c546e5038501a612f71c51d93418bb3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 3 Jan 2020 15:58:53 +0000 Subject: [PATCH] Bug 24336: Ask for confirmation before deleting a suggestion in the OPAC This patch modifies the OPAC suggestions interface so that patrons will be asked for confirmation before deleting suggestions. The patch also makes some minor markup changes to improve consistency between this interface and others in the OPAC. To test, apply the patch and log in to the OPAC as a user who has submitted multiple suggestions. - From the list of your suggestions, confirm that the "New purchase suggestion" and "Delete" links have Font Awesome icons. - Check the checkbox corresponding to one of your suggestions. You can also now click the title of the suggestions to control the checkbox. - When you check a box the "Delete" link at the top of the page should activate. - Clicking the delete link should trigger a confirmation modal showing the title(s) you selected. - The message and button labels should reflect whether one or multiple titles are being deleted. - Test that the confirm and cancel controls work correctly. - Also test this process via the delete button at the bottom of the table of suggestions. Signed-off-by: Maryse Simard Signed-off-by: Katrin Fischer --- .../bootstrap/en/modules/opac-suggestions.tt | 62 +++++++++++++++------- 1 file changed, 42 insertions(+), 20 deletions(-) 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 bc76338626..20fd60cc58 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -274,14 +274,14 @@ [% END %] -
+ [% IF ( loggedinusername || ( Koha.Preference( 'AnonSuggestions' ) == 1 ) ) %]
[% IF ( Koha.Preference('MaxOpenSuggestions') != '' && patrons_pending_suggestions_count >= Koha.Preference('MaxOpenSuggestions') ) %]

You have reached your limit of suggestions you can place at this time ([% Koha.Preference('MaxOpenSuggestions') | html %]).
Once the library has processed those suggestions you will be able to place more.

[% ELSE %] - New purchase suggestion + New purchase suggestion [% END %]
[% END %] @@ -314,12 +314,12 @@ [% IF ( loggedinusername ) %] [% IF ( suggestions_loo.showcheckbox ) %] - + [% END %] [% END %] -

[% suggestions_loo.title | html %]

+

[% IF ( suggestions_loo.author ) %][% suggestions_loo.author | html %],[% END %] [% IF ( suggestions_loo.copyrightdate ) %] - [% suggestions_loo.copyrightdate | html %],[% END %] [% IF ( suggestions_loo.publishercode ) %] - [% suggestions_loo.publishercode | html %][% END %] @@ -373,7 +373,7 @@ [% IF ( loggedinusername ) %]

- +
[% END %]
@@ -387,7 +387,7 @@ [% IF ( Koha.Preference('MaxOpenSuggestions') != '' && patrons_pending_suggestions_count >= Koha.Preference('MaxOpenSuggestions') ) %]

You have reached your limit of suggestions you can place at this time.
Once the library has processed those suggestions you will be able to place more.

[% ELSE %] -

New purchase suggestion

+

New purchase suggestion

[% END %] [% END %] [% END # / IF suggestions_loop %] @@ -404,7 +404,6 @@ [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] [% INCLUDE 'datatables.inc' %] [% END %] -- 2.11.0