Bug 2324 - Undo Import should have a confirm dialog
Summary: Undo Import should have a confirm dialog
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: Main
Hardware: PC All
: P3 enhancement
Assignee: Aleisha Amohia
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-08 04:14 UTC by Chris Cormack
Modified: 2016-12-05 21:27 UTC (History)
2 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 2324: Adding confirm dialog when undoing import (2.24 KB, patch)
2016-03-29 01:43 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 2324: Adding confirm dialog when undoing import (2.25 KB, patch)
2016-03-31 06:00 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 2324: Adding confirm dialog when undoing import (2.29 KB, patch)
2016-04-06 00:45 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 2324: Adding confirm dialog when undoing import (2.37 KB, patch)
2016-04-06 12:19 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 00:49:52 UTC


---- Reported by rch@liblime.com 2008-07-08 16:14:46 ----

Not a good button to click accidentally.  A javascript confirm should be present here.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 00:49 UTC  ---

This bug was previously known as _bug_ 2324 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=2324

Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was rch@liblime.com.

Comment 1 Katrin Fischer 2014-10-10 23:07:26 UTC
I'd like to see that, also for cleaning import batches.
Comment 2 Aleisha Amohia 2016-03-29 01:43:30 UTC Comment hidden (obsolete)
Comment 3 Mark Tompsett 2016-03-31 01:51:01 UTC
Comment on attachment 49616 [details] [review]
Bug 2324: Adding confirm dialog when undoing import

Review of attachment 49616 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
@@ +364,4 @@
>      <input type="hidden" name="runinbackground" value="" />
>      <input type="hidden" name="completedJobID" value="" />
>      <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
> +    <fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return confirm(MSG_CONFIRM_UNDO_IMPORT); return submitBackgroundJob(this.form);" /></fieldset>

I don't think you want a double return. I think you want a &&.
Comment 4 Aleisha Amohia 2016-03-31 06:00:06 UTC Comment hidden (obsolete)
Comment 5 Mark Tompsett 2016-04-06 00:45:01 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-04-06 12:19:34 UTC
Created attachment 49958 [details] [review]
Bug 2324: Adding confirm dialog when undoing import

EDIT: Comment 3

To test:
1) Go to Tools -> Staged MARC Management
2) Click on a batch to see details
3) If not already imported, then import, otherwise you should already see the button to undo import into catalog.
4) Click this button. Confirm you are asked to confirm. Confirm clicking Cancel will cancel the undo. Confirm clicking OK will continue with the undo.

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Brendan Gallagher 2016-04-27 16:28:46 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!