Browse Source

Bug 12937 [Follow-up] Deleting suggestions should ask for a confirmation

This minor follow-up revises the language a bit: Adding missing question
marks and using the more standard prompt "Please select at least one..."

To test, follow the previous test plan and confirm that the prompts are
improved:

- go on the suggestion management page
- don't select any suggestion and try to delete (check the checkbox and
  submit the form). Verify that you get an alert.
- select 1 suggestion and delete it, verify you get a confirmation
  message
- select 1+ suggestions and delete it, verify you get a confirmation
  message

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
MM-OPAC/theme_dep
Owen Leonard 10 years ago
committed by Tomas Cohen Arazi
parent
commit
755655a42a
  1. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt

6
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt

@ -141,16 +141,16 @@ $(document).ready(function() {
if ( action_delete_selected ) {
var suggestions_to_delete = $(this).find("input[name='edit_field']:checked");
if ( suggestions_to_delete.length == 0 ) {
alert(_("No suggestion to delete"));
alert(_("Please select at least one suggestion to delete"));
e.preventDefault();
return false;
} else if ( suggestions_to_delete.length == 1 ) {
if ( ! confirm(_("Are you sure you want to delete this suggestion")) ) {
if ( ! confirm(_("Are you sure you want to delete this suggestion?")) ) {
e.preventDefault();
return false;
}
} else if ( suggestions_to_delete.length > 1 ) {
if ( ! confirm(_("Are you sure you want to delete these suggestions")) ) {
if ( ! confirm(_("Are you sure you want to delete these suggestions?")) ) {
e.preventDefault();
return false;
}

Loading…
Cancel
Save