Koha/koha-tmpl/opac-tmpl/bootstrap/js/privacy.js
Owen Leonard b25cd57592
Bug 34031: Move various translatable strings out of opac-bottom.inc
This patch moves some JS variable definitions out of opac-bottom.inc.
These variables where defined so that they could be picked up for
translation, but they can now be moved to the corresponding <script>
blocks.

Many other of these variables are not used at all and have been removed.

To test you should have EnableOpacSearchHistory, OPACPrivacy, and
opacreadinghistory enabled. Apply the patch and log into the OPAC as a
user with suggestions, search history, and checkout history.

- Click your user menu at the top of the page and click the "Clear" link
  for search history. You should see a confirmation, "Are you sure you
  want to delete your search history?" Confirming should trigger your
  search history deletion.
- From your user summary page, click "Privacy." Under "Immediate
  deletion," clicking any of the delete buttons should trigger a
  confirmation, "Warning: Cannot be undone. Please confirm once again"
- From your user summary page, click "Purchase suggestions."
  - Without checking any checkbox, click the "Delete selected" button at
    the bottom. You should see an alert, "No suggestion was selected."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-10-09 11:41:15 -03:00

6 lines
220 B
JavaScript

/* global __ confirmDelete */
$(document).ready(function(){
$('.privacy-confirm-delete').on('click',function(){
return confirmDelete( __("Warning: Cannot be undone. Please confirm once again") );
});
});